#11498 closed defect (fixed)
FilteringSelect searchAttr/labelFunc examples broken.
Reported by: | timtoo | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | Documentation | Version: | 1.5 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
This behavior can be seen on the current (v1.5) reference manual example page:
http://www.dojotoolkit.org/reference-guide/dijit/form/FilteringSelect.html
Specifically the "Custom displayed value/search text" and "Transforming the displayed value using labelFunc" examples. Both of them set the initial value of the control to "KY" (one first example is via markup, the second is programmatic), but after the widget loads the input is blank.
I have found using QueryReadStore? (v1.4.3) and watching the XHR calls that the initial query sent by the widget seems to be always using "id" for the searchAttr even though the searchAttr has been set to another value (as it has in the above examples). Subsequent queries in response to input do use the proper searchAttr, however. (I assume ItemFileReadStore? is behaving the same way, but I don't know how to monitor its queries.)
Change History (4)
comment:1 Changed 12 years ago by
Component: | Dijit → Documentation |
---|---|
Milestone: | tbd → 1.6 |
Summary: | FilteringSelect using ItemFileReadStore ignores searchAttr on initial query → FilteringSelect searchAttr/labelFunc examples broken. |
comment:2 Changed 12 years ago by
Owner: | set to bill |
---|
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
OK, fixed in http://docs.dojocampus.org/dijit/form/FilteringSelect, it'll be rolled out to http://www.dojotoolkit.org/reference-guide/dijit/form/FilteringSelect.html eventually.
Good catch on the broken example pages. It looks like it's just a problem with the example though, not with the code. You need to set the store as an initial parameter to the widget, not set it afterwards, and even if you could set it afterwards it would be via
myWidget.set("store", ...)
notmyWidget.store = ...
.This works fine:
I'll update the examples in the documentation.