Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Filterable inside custom select: data-filtertext is ignored #7677

Closed
slavap opened this issue Sep 17, 2014 · 6 comments
Closed

Filterable inside custom select: data-filtertext is ignored #7677

slavap opened this issue Sep 17, 2014 · 6 comments

Comments

@slavap
Copy link

slavap commented Sep 17, 2014

Listview li items must be created with data-filtertext attributes copied from options.
Test: http://jsbin.com/huvoraba/130/edit

@gabrielschulhof
Copy link

@slavap I've updated the demo to take into account the filtertext. The updated demo should appear in the next version of jQuery Mobile.

Note that the updated demo also fixes another issue I accidentally introduced, whereby, once a select menu opens as a dialog, the text input doing the filtering is not returned to the popup afterwards. So, if the menu opens as a dialog even once and later opens as a popup, then the popup will not have the text input, because the text input stays with the dialog.

@slavap
Copy link
Author

slavap commented Sep 18, 2014

@gabrielschulhof
Thanks! But your fix is not completely proper. When data-filtertext is defined, original content should be ignored, but in your demo both orange and florida are working.

@gabrielschulhof
Copy link

Nono ... "Orange" doesn't work. "Or" works because of Fl​OR​ida. If you type "Ora", you get no hits.

@slavap
Copy link
Author

slavap commented Sep 18, 2014

Sorry, my mistake, thanks again!

@Sanafan
Copy link

Sanafan commented Sep 18, 2014

Hey Guys,
what about this?

flori gives me the result orange
flora gives me no result

why?

@jaspermdegroot jaspermdegroot modified the milestones: 1.4.5, 1.5.0 Sep 18, 2014
@slavap
Copy link
Author

slavap commented Sep 18, 2014

@Sanafan
Orange is just display value, but search value for it is Florida. That's why flori gives you orange, and flora gives you nothing.

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

Successfully merging a pull request may close this issue.

4 participants