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 allow use of placeholder with allowClear properties #91

Closed
nekkon opened this issue Oct 12, 2014 · 2 comments
Closed

Select2 allow use of placeholder with allowClear properties #91

nekkon opened this issue Oct 12, 2014 · 2 comments

Comments

@nekkon
Copy link

nekkon commented Oct 12, 2014

Hello, the following code does not work when i try to pass some parameters to the constructor of a Select2. Please advise me if there is something wrong. The clear button of select2 does not appear at all and the default placeholder is "Select value". Thanks!

{
column_number: 1,
select_type:"select2",
filter_container_id: "Select1",
select_type_options:{placeholder:"ΠΕΛΑΤΗΣ/ΕΠΩΝΥΜΙΑ",allowClear:true,width:"250px"},
filter_reset_button_text:false
}

@nekkon
Copy link
Author

nekkon commented Oct 12, 2014

What I am trying to do in the above is to be able to use the default clear way of Select2. The default clear/reset is an x button that when is clicked resets the filter and makes it to have the placeholder's value. Unfortunately the Clear button of select2 does not appear. Based on the documentation of Select2 it should appear if there is a placeholder and the first option of the select is empty.

@vedmack vedmack changed the title Passing select options to constructor Select2 allow use of placeholder with allowClear properties Oct 13, 2014
vedmack added a commit that referenced this issue Oct 14, 2014
Select2 allow use of placeholder with allowClear properties #91

Removed fix for #90

Bugs fix #68
@vedmack
Copy link
Owner

vedmack commented Oct 14, 2014

added in 0.8.5.beta.2 see it in action http://yadcf-showcase.appspot.com/DOM_source_select2.html (fifth column)

@vedmack vedmack closed this as completed Oct 14, 2014
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