We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What you were expecting: When creating the BulkArchiveButton, I expected correct execution mutation
What happened instead: UPDATE_MANY a few times causes the execution of the UPDATE the required ID argument is not passed to the {data} parameter
Steps to reproduce: try to update any resource through the CustomBulkActionButton
Other information: Wrote the BulkArchiveButton as in the example in the documentation:
class BulkArchiveButton extends Component { handleArchive = () => { const { basePath, resource, selectedIds, startUndoable } = this.props; startUndoable( crudUpdateMany(resource, selectedIds, { isArchved: true }, basePath) ); }; render() { const { className, classes, filterValues } = this.props; return ( <Button size="small" variant="outlined" label="raExt.action.archive" onClick={this.handleArchive} className={`${classes.button} ${classes.archiveButton} ${className}`} > <ArchiveIcon /> </Button> ); } }
This is the request this button sends:
That's what gets a response:
To solve the problem fixed
C:...\ui-react-admin\node_modules\ra-data-graphql-simple\esm\index.js
... if (fetchType === UPDATE_MANY) { var ids = params.ids, otherParams_2 = __rest(params, ["ids"]); return Promise.all(params.ids.map(function (id) { //return defaultDataProvider(UPDATE, resource, __assign({ id: id }, otherParams_2)); return defaultDataProvider(UPDATE, resource, {data:__assign({ id: id }, otherParams_2.data)}); })).then(function (results) { var data = results.reduce(function (acc, _a) { var data = _a.data; return acc.concat([data.id]); }, []); return { data: data }; }); } ...
Please, fix for next release. Environment
The text was updated successfully, but these errors were encountered:
ping @djhi
Sorry, something went wrong.
Can you make a PR to fix this ?
Successfully merging a pull request may close this issue.
What you were expecting:
When creating the BulkArchiveButton, I expected correct execution mutation
What happened instead:
UPDATE_MANY a few times causes the execution of the UPDATE
the required ID argument is not passed to the {data} parameter
Steps to reproduce:
try to update any resource through the CustomBulkActionButton
Other information:
Wrote the BulkArchiveButton as in the example in the documentation:
This is the request this button sends:
That's what gets a response:
To solve the problem fixed
Please, fix for next release.
Environment
The text was updated successfully, but these errors were encountered: