core
core copied to clipboard
Limit option value in select and relations fields is limited by Vue Multiselect
Having the option limit
set to a value greater than 500 will not display more than 500 items on a select or relationship field.
Apparently there are some limitations in the Vue Multiselect library as i could find in this issue https://github.com/shentao/vue-multiselect/issues/123.
It looks like when having long lists (+500 items) the functionality needs to be adjusted for being able to retrieve all values. Making use of their asynchronous select https://vue-multiselect.js.org/#sub-asynchronous-select
Details
Question | Answer |
---|---|
Relevant Bolt Version | 5.2 |
Install type | Composer install |
PHP version | 8.2 |
Web server | Symfony local server |
Reproduction
Add the limit
option limit: 600
to a relationship field with more than 500 records. This setup should display 600 records or less in the relationship select field, but only 500 are shown.
Expected result
600 records are displayed in the relationship select field
Actual result
A maximum of 500 records are displayed in the relationship select field
This might not be a bug. I have managed to add 5000+ records into a relationship field locally and having them display in the select field.
I have applied a small fix here https://github.com/bolt/core/pull/3506 to properly override the limit option for the relationship select field.
The issue I described happens on a heavily cached production site and that might also be related.
When the PR is merged and a new release is tagged I'll update the production project to verify if that fixed it.