Skip to content
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

[RFR] Add ability to paginate ReferenceManyField #2580

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

fzaninotto
Copy link
Member

And if you want to allow users to paginate the list, pass a <Pagination> component as the pagination prop:

import { Pagination } from 'react-admin';

<ReferenceManyField pagination={<Pagination />} reference="comments" target="post_id">
   ...
</ReferenceManyField>

peek 27-11-2018 12-42

@fzaninotto fzaninotto added this to the 2.5.0 milestone Nov 27, 2018
Copy link
Collaborator

@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.

🔥

@djhi djhi merged commit ce7f691 into next Nov 27, 2018
@djhi djhi deleted the add-pagination-to-reference-many-field branch November 27, 2018 13:25
@digitalbase
Copy link

Wondering how you removed the field label from this view ?

This is what it looks like for me (latest 2.5.1)

screenshot 2018-12-04 at 14 33 50

Code

<Tab label="rooms">
                <ReferenceManyField reference="rooms" target="license_id" label="Rooms">
                    <Datagrid>
                        <TextField source="id" />
                        <TextField source="name" />
                        <TextField source="status" />
                        <PrezlyUrlField source="domain" />
                        <EditButton />
                        <EmulateButton />
                    </Datagrid>
                </ReferenceManyField>
            </Tab>

@fzaninotto
Copy link
Member Author

@digitalbase Ask StackOverflow ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants