How to use the ra-core.crudDeleteMany function in ra-core

To help you get started, we’ve selected a few ra-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bootstrap-styled / ra-ui / src / components / list / BulkDeleteAction.js View on Github external
if (process.env.NODE_ENV !== 'production') {
      // eslint-disable-next-line no-console
      console.warn(
        ' is deprecated. Use the  component instead, via the bulkActionButton props.'
      );
    }
    const {
      basePath,
      dispatchCrudDeleteMany,
      resource,
      selectedIds,
      startUndoable,
      undoable,
    } = this.props;
    if (undoable) {
      startUndoable(crudDeleteMany(resource, selectedIds, basePath));
    } else {
      dispatchCrudDeleteMany(resource, selectedIds, basePath);
    }
    this.props.onExit();
  };
github marmelab / react-admin / packages / ra-ui-materialui / src / list / BulkDeleteAction.js View on Github external
useEffect(() => {
        if (process.env.NODE_ENV !== 'production') {
            // eslint-disable-next-line no-console
            console.warn(
                ' is deprecated. Use the  component instead, via the bulkActionButton props.'
            );
        }
        const { basePath, resource, selectedIds, undoable, onExit } = props;
        if (undoable) {
            dispatch(
                startUndoable(crudDeleteMany(resource, selectedIds, basePath))
            );
        } else {
            dispatch(crudDeleteMany(resource, selectedIds, basePath));
        }
        onExit();
    }, [dispatch, props]);
github marmelab / react-admin / packages / ra-ui-materialui / src / button / BulkDeleteButton.js View on Github external
handleClick = () => {
        const {
            basePath,
            dispatchCrudDeleteMany,
            resource,
            selectedIds,
            startUndoable,
            undoable,
            onClick,
        } = this.props;
        if (undoable) {
            startUndoable(crudDeleteMany(resource, selectedIds, basePath));
        } else {
            dispatchCrudDeleteMany(resource, selectedIds, basePath);
        }

        if (typeof onClick === 'function') {
            onClick();
        }
    };
github bootstrap-styled / ra-ui / src / components / button / BulkDeleteWithUndoButton.js View on Github external
handleClick = () => {
    const {
      basePath,
      resource,
      selectedIds,
      startUndoable,
      onClick,
    } = this.props;

    startUndoable(crudDeleteMany(resource, selectedIds, basePath));

    if (typeof onClick === 'function') {
      onClick();
    }
  };