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

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

Projects

None yet

4 participants

@slavap
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 gabrielschulhof added this to the 1.4.5 milestone Sep 18, 2014
@gabrielschulhof gabrielschulhof self-assigned this Sep 18, 2014
@gabrielschulhof
Contributor

@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
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
Contributor

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

@slavap
slavap commented Sep 18, 2014

Sorry, my mistake, thanks again!

@Sanafan
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 milestone: 1.4.5, 1.5.0 Sep 18, 2014
@slavap
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.

@gabrielschulhof gabrielschulhof modified the milestone: 1.4.5, 1.5.0 Sep 23, 2014
@agcolom agcolom added a commit to agcolom/jquery-mobile that referenced this issue Nov 26, 2014
@gabrielschulhof @agcolom gabrielschulhof + agcolom Selectmenu: Filterable demo now filters/refreshes selectmenu widget
Closes gh-7681
Fixes gh-7677
bf21ea3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment