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

Select2: Default the placeholder to the option with an empty value #88

Open
d4mation opened this issue Jul 2, 2021 · 0 comments
Open

Comments

@d4mation
Copy link
Member

d4mation commented Jul 2, 2021

If you passed into options something like:

array(
   'options' => array( '' => 'Select an option' ) + $options,
)

It would be nice if it would populate the Select2 placeholder automatically if an option with an empty value existed. If no Select2 placeholder is provided, it will cause the field to collapse on itself which looks bad/buggy.

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

1 participant