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

Public set placeholder API #2807

Closed
mnpenner opened this issue Nov 14, 2014 · 1 comment
Closed

Public set placeholder API #2807

mnpenner opened this issue Nov 14, 2014 · 1 comment

Comments

@mnpenner
Copy link

It doesn't appear to be possible to change the placeholder on an already instantiated select2 without going through the internal API.

How we have to do it now:

var select2 = $select.data("select2");
select2.opts.placeholder = "New Placeholder";
select2.setPlaceholder();

How I think it should be done:

$select.select2('placeholder', "New Placeholder");
@kevin-brown
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants