Opened 9 years ago
Closed 9 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: |
Description
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)
Change History (2)
Changed 9 years ago by
Attachment: | filteringselectcontainstest.html added |
---|
comment:1 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
Stand-alone test case.