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

Show every HasMany child #2271

Closed
tancrede opened this issue Sep 28, 2022 · 3 comments
Closed

Show every HasMany child #2271

tancrede opened this issue Sep 28, 2022 · 3 comments

Comments

@tancrede
Copy link

dear developers of this wonderful gem,

I realize that sometimes, I'd like to display all the children of a given model in his dashboard.
Actually, the only way I know to override the default pagination value is to use the limit: option and set an arbitrary large number

ATTRIBUTE_TYPES = {
    names: Field::HasMany.with_options(limit: 100),
  }.freeze

It would be very nice to have a special value that says : display all the children. Something like this :

ATTRIBUTE_TYPES = {
    names: Field::HasMany.with_options(limit: 0),
  }.freeze

I hope this idea is not too strange and it will interest at least one of you

Please continu the good work around Administrate,

Best

@tancrede
Copy link
Author

tancrede commented Oct 4, 2022

Hi jubilee2,

Thanks for the proposal. If my understanding of your code is write, this change would allow something like this ?

ATTRIBUTE_TYPES = {
    names: Field::HasMany.with_options(paginate: false),
  }.freeze

@tancrede
Copy link
Author

Has been solved here #2274

@pablobm
Copy link
Collaborator

pablobm commented Nov 24, 2022

Actually, there was a problem in the merged code 😓 Fix should be in #2289

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

No branches or pull requests

2 participants