marmelab / ng-admin

Add an AngularJS admin GUI to any RESTful API
http://ng-admin-book.marmelab.com/
MIT License
3.95k stars 725 forks source link

reference_many dropdown wont show all entries #1352

Closed toblie closed 7 years ago

toblie commented 7 years ago

The issue is, that ngadmin uses a limit query to GET the reference records. This way only the first 30 records are displayed on dropdown fields. I think this is not useful. Can anyone tell me how remove this limit for these kind of fields or just deactivate pagination here? Here is my field declaration: nga.field('topics', 'reference_many') .targetEntity(topic) .targetField(nga.field('name')) .label('Topics'),

Thanks

toblie commented 7 years ago

OK... I found the solution... sorry for the issue. For other users who need the solution:

nga.field('topics', 'reference_many')
        .targetEntity(topic)
        .targetField(nga.field('name'))
        .perPage(999999)
        .sortField('name')
        .label('Topics'),