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

allowEmptyOption regression in 0.12 ? #749

Closed
y0hnn opened this issue Mar 26, 2015 · 6 comments
Closed

allowEmptyOption regression in 0.12 ? #749

y0hnn opened this issue Mar 26, 2015 · 6 comments

Comments

@y0hnn
Copy link

y0hnn commented Mar 26, 2015

Hi,

In the version before 0.12, allowEmptyOption was working this way : the empty option - aka the placeholder - was inserted in the dropdown as an option of the select.
Now, it is inserted as a placeholder on the input. Seems great, but... if we set a display none property on the input to disable it, we can't see the placeholder anymore... It seems to be a big regression !

Any thoughts on this ?

@thekrotek
Copy link

Yes, a very strange behavior. You set this option to true and placeholder (empty option) simply removed.

@dext0r
Copy link

dext0r commented May 8, 2015

Hi,
I've found a fast and dirty hack.
In function registerOption replace
if (!key || this.options.hasOwnProperty(key)) return false;
to
if ((!key || this.options.hasOwnProperty(key)) && !this.settings.allowEmptyOption) return false;
It seems working for me.

whather pushed a commit to whather/selectize.js that referenced this issue May 13, 2015
@gucki
Copy link

gucki commented Sep 25, 2015

👍 for the fix

derekprior added a commit to MIT-IR/abet that referenced this issue Jan 5, 2016
There is a bug with the `allowEmptyOption` setting in 0.12.x. See:

* selectize/selectize.js#749
* selectize/selectize.js#967
* selectize/selectize.js#739
@viceversus
Copy link

👍 for the fix

@cinic
Copy link

cinic commented Feb 28, 2016

@whather 👍

@joallard
Copy link
Member

joallard commented Jun 8, 2016

Duping #739

@joallard joallard closed this as completed Jun 8, 2016
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

7 participants