Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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]);
public componentDidMount = () => {
// const { basePath, startUndoable, resource, selectedIds } = this.props;
const { basePath, resource, selectedIds } = this.props;
startUndoable(crudUpdateMany(resource, selectedIds, { status: "accepted" }, basePath));
this.props.onExit && this.props.onExit();
};
public componentDidMount = () => {
const { basePath, resource, selectedIds } = this.props;
startUndoable(crudUpdateMany(resource, selectedIds, { status: "rejected" }, basePath));
this.props.onExit && this.props.onExit();
};