chosen icon indicating copy to clipboard operation
chosen copied to clipboard

search issue

Open JHSPHshe opened this issue 8 years ago • 5 comments

It works just fine few days ago, but now when i search word from middle sentence, i can only search one word instead of few word with space separator.

for example:

Atlanta Falcons New Orleans Saints Tampa Bay Buccaneers

If i search from beginning, everything works fine, but if i search "Bay Bucc" , it will show me 'no result match "Bay Bucc".

Any idea? thanks.

We use 1.1.0 chosen.jquery.min.js, in every browser

JHSPHshe avatar Feb 13 '17 15:02 JHSPHshe

Hi there, Search for winnow_resulsts and change the regex expression, remove the '^'+

Change "new RegExp('^' + searchText.replace(/[-[]{}()+?.,\^$|#\s]/g, "\$&"), 'i'), " to new RegExp(searchText.replace(/[-[]{}()+?.,\^$|#\s]/g, "\$&"), 'i'),

allandesa avatar Feb 14 '17 17:02 allandesa

which file i should going to search for? i search string "'^'" in 1.1.0/chosen.jquery.min.js file, but can not find the expression you mention above, any idea? thanks.

JHSPHshe avatar Feb 14 '17 19:02 JHSPHshe

See https://github.com/julesjanssen/chosen/blob/master/Source/chosen.js#L618-L619 But it looks like you're looking at the original jQuery version, not this MooTools fork.

julesjanssen avatar Feb 14 '17 19:02 julesjanssen

Yes, we use original JQuery version (1.1.0 chosen.jquery.min.js), if so,how to solve the issue? thanks.

JHSPHshe avatar Feb 17 '17 17:02 JHSPHshe

No idea, but please have a look at that version's repository & documentation here: https://github.com/harvesthq/chosen

julesjanssen avatar Feb 17 '17 17:02 julesjanssen