Opened 10 years ago

Closed 10 years ago

#13915 closed defect (wontfix)

dijit.form.FilteringSelect queryExpr=*${0}* does not work

Reported by: timdp Owned by: Douglas Hays
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.6.1
Keywords: dijit form filteringselect queryExpr contains Cc:
Blocked By: Blocking:


I've recently had a need to use FilteringSelect? to perform a "contains" search rather than the default "starts with" search.

When I set queryExpr to "*${0}*" as mentioned in the API documents, the behaviour is not as expected. When you type characters, the FilterSelect? appears to partial match, and the matching causes the characters you've typed to be replaced by the characters from the matched item.

Eg. I type 'am' as I want to find AMerican Samoa, this cause a match on AlabAMa, my characters 'am' are replaced by 'al'. There is no way I can select American Samoa by typing.

Attachments (1)

filteringselectcontainstest.html (5.3 KB) - added by timdp 10 years ago.
Stand-alone test case.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by timdp

Stand-alone test case.

comment:1 Changed 10 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

Searching in the middle of the strings is only defined with autoComplete=false. Otherwise, the first element that matches is shown (Alabama) and the leading Alab would need to be selected AND the trailing a as well (which is not possible) and then when you typed another character, it wouldn't be defined as to whether the Alab is replaced or the trailing a, but neither would be correct.

Note: See TracTickets for help on using tickets.