#6382 closed defect (fixed)
reset() on FilteringSelect not allowed if no "initial value" given
Reported by: | wolfram | Owned by: | haysmark |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit - Form | Version: | 1.1.0 |
Keywords: | Cc: | nathan | |
Blocked By: | Blocking: |
Description
When calling reset() on a FilteringSelect? that has no option with the attribute "checked" styles the field as error.
reproduce:
- example http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_FilteringSelect.html
- choose a state form "state list 2:"
- and calling "dijit.byId("setvaluetest").reset()" in firebug then makes the field turn yellow
is this intended?
I kind of understand the logic, only a valid value can be selected, but after the initial page load no value is selected too, so its possible. and i would expect that to happen on reset() too.
Attachments (1)
Change History (7)
Changed 13 years ago by
Attachment: | patch6382.diff added |
---|
comment:1 Changed 13 years ago by
Summary: | reset() on FilteringSelect not allowed if no "initial value" given → [patch] [cla] reset() on FilteringSelect not allowed if no "initial value" given |
---|
comment:2 Changed 13 years ago by
Milestone: | → 1.2 |
---|---|
Owner: | set to haysmark |
comment:3 Changed 13 years ago by
Ok, I see the general idea here. To reset FilteringSelect?, it should be sufficient to set _hasBeenBlurred to false and call setDisplayedValue(""). Also, ComboBox? has a reset to clear the item attribute that we will need to add in.
comment:4 Changed 13 years ago by
Status: | new → assigned |
---|---|
Summary: | [patch] [cla] reset() on FilteringSelect not allowed if no "initial value" given → reset() on FilteringSelect not allowed if no "initial value" given |
I'm going to wait on this one until we close #5974. This will integrate nicely with that change.
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in [13989]. FilteringSelect? passes the test in the ticket's description.
comment:6 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
the patch is actually pretty hacky i think. It just does everything to make it look good (setting the state by hand, etc) which is extracted functionality from validate() so i guess, this is not really a good patch. but it makes it work (for me at least) and demonstrates how i think it should be correct.