Skip to content

Update <ExportButton> to make in work in every list#11119

Merged
fzaninotto merged 15 commits intonextfrom
exporterbutton-listcontext
Jan 21, 2026
Merged

Update <ExportButton> to make in work in every list#11119
fzaninotto merged 15 commits intonextfrom
exporterbutton-listcontext

Conversation

@WiXSL
Copy link
Copy Markdown
Collaborator

@WiXSL WiXSL commented Jan 17, 2026

Implements #8931

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

@WiXSL WiXSL added the RFR Ready For Review label Jan 17, 2026
Copy link
Copy Markdown
Member

@fzaninotto fzaninotto left a 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[]>;
Copy link
Copy Markdown
Member

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> {
Copy link
Copy Markdown
Member

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,
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Copy Markdown
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread packages/ra-core/src/controller/field/useReferenceManyFieldController.ts Outdated
Comment thread packages/ra-ui-materialui/src/button/ExportButton.tsx
@fzaninotto fzaninotto merged commit 625d03d into next Jan 21, 2026
15 checks passed
@fzaninotto fzaninotto deleted the exporterbutton-listcontext branch January 21, 2026 21:10
@fzaninotto fzaninotto added this to the 5.14.0 milestone Jan 21, 2026
@fzaninotto fzaninotto changed the title Improve <ExportButton> with list-context getData Update <ExportButton> to make in work in every list Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants