-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Update <ExportButton> to make in work in every list
#11119
New issue
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
Conversation
fzaninotto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
| defaultTitle?: string; | ||
| displayedFilters: any; | ||
| exporter?: Exporter | false; | ||
| getData?: (options?: GetDataOptions<RecordType>) => Promise<RecordType[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a FIXME comment to make this prop non optional in the next major
| .filter(propName => !injectedProps.includes(propName)) | ||
| .reduce((acc, key) => ({ ...acc, [key]: props[key] }), {}); | ||
|
|
||
| export interface GetDataOptions<RecordType extends RaRecord = any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linter warning
| maxResults ?? (total != null ? total : DEFAULT_MAX_RESULTS); | ||
| const { data } = await queryClient.fetchQuery({ | ||
| queryKey: [ | ||
| resource, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mismatch with the query. Did you mean resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
djhi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
packages/ra-core/src/controller/field/useReferenceManyFieldController.ts
Outdated
Show resolved
Hide resolved
<ExportButton> with list-context getData<ExportButton> to make in work in every list
Implements #8931
Additional Checks
masterfor a bugfix or a documentation fix, ornextfor a feature