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

DropdownField search threshhold is hardcoded to 20 #2776

Open
Oliver996 opened this issue Sep 5, 2022 · 1 comment
Open

DropdownField search threshhold is hardcoded to 20 #2776

Oliver996 opened this issue Sep 5, 2022 · 1 comment

Comments

@Oliver996
Copy link

The DropdownField already has a search for the options, but it's only displayed when there are more than 20 entries. I would like to use it with less than 20 entries, but I did not find an option to force the search to be displayed. Is there an option for that or could one be added?

@GuySartorelli
Copy link
Member

GuySartorelli commented Sep 12, 2022

Unfortunately the value is currently hardcoded to specifically 20 items. This is in https://github.com/silverstripe/silverstripe-admin/blob/1/client/src/legacy/LeftAndMain.js#L118

If you want to create a PR to make this configurable then I'd be happy to look at it, but this is a low priority at the moment.

You might want to use ListboxField instead in the meantime.

@GuySartorelli GuySartorelli changed the title DropdownField search DropdownField search threshhold is hardcoded to 20 Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants