harvesthq / chosen

Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.
http://harvesthq.github.io/chosen/
Other
21.85k stars 4.1k forks source link

Search not work correctly? #71

Closed allmoney closed 13 years ago

allmoney commented 13 years ago

I inserted chosen to my webpage: http://www.tophouse.ru/price/index-new.php And try to search (for example): velux And found only 1 result. But there are 2 results in my SELECT options. What's wrong? Bug or not?

pfiller commented 13 years ago

You're seeing that because the options have leading spaces. Chosen's regex uses the ^ character to start at the beginning of a string.

"option", not " option"

If you want that indented style, you should consider using optgroups (see documentation).

allmoney commented 13 years ago

But I can't click optgroup name in this case :(