hernansartorio / jquery-nice-select

A lightweight jQuery plugin that replaces native select elements with customizable dropdowns.
http://jqueryniceselect.hernansartorio.com
957 stars 286 forks source link

Add search Option in select tag #61

Open rts-ssoundar619 opened 6 years ago

rts-ssoundar619 commented 6 years ago

Please add search option in the select tag. If it already exists please guide me to get it done.

vijayhardaha commented 6 years ago

Hey,

I've added search and multiple options. You can find new js and additional CSS File here. You can remove old jquery.nice-select.js and use this new one and you have to add additional CSS into you nice-select.css file at the bottom.

https://goo.gl/RpqoMR https://goo.gl/zJK3F4

abidhussainsafi commented 5 years ago

Ho to add search html input for multiple item search

limuel567 commented 5 years ago

Dropdown closing when hitting space bar, how do I fix it?

KonkeyDong37 commented 5 years ago

Dropdown closing when hitting space bar, how do I fix it?

Remove space event "event.keyCode == 32"

hleow0707 commented 4 years ago

Hey,

I've added search and multiple options. You can find new js and additional CSS File here. You can remove old jquery.nice-select.js and use this new one and you have to add additional CSS into you nice-select.css file at the bottom.

https://goo.gl/RpqoMR https://goo.gl/zJK3F4

If i have multiple select dropdown form How can i apply search option to select that has many option only? it looks like it applied to select dropdown that only have a few option. or i can specify in class or something? thanks

Screen Shot 2019-10-25 at 12 15 28 AM
vijayhardaha commented 4 years ago

You'll have to add multiple attributes in the HTML tag to enable multiple dropdown option.

hleow0707 commented 4 years ago

You'll have to add multiple attributes in the HTML tag to enable multiple dropdown option.

what attribute to disable? and enable as well? can u give example? it seems it my case, when put your code it just applied to all select tag. thanks

aurovrata commented 4 years ago

Why not simply use select2 plugin

tronix3 commented 3 years ago

Dropdown closing when hitting space bar, how do I fix it?

If you haven't already fixed, I fixed this by changing the following line in jquery.nice-select.min.js:

if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?l.trigger("click"):s.trigger("click"),!1

to

if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1

ronaldtech051 commented 1 year ago

Hey,

I've added search and multiple options. You can find new js and additional CSS File here. You can remove old jquery.nice-select.js and use this new one and you have to add additional CSS into you nice-select.css file at the bottom.

https://goo.gl/RpqoMR https://goo.gl/zJK3F4

Can I use search option in single selection?