Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#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:

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)

patch6382.diff (657 bytes) - added by wolfram 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by wolfram

Attachment: patch6382.diff added

comment:1 Changed 11 years ago by wolfram

Summary: reset() on FilteringSelect not allowed if no "initial value" given[patch] [cla] reset() on FilteringSelect not allowed if no "initial value" given

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.

comment:2 Changed 11 years ago by Douglas Hays

Milestone: 1.2
Owner: set to haysmark

comment:3 Changed 11 years ago by haysmark

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 11 years ago by haysmark

Status: newassigned
Summary: [patch] [cla] reset() on FilteringSelect not allowed if no "initial value" givenreset() 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 11 years ago by haysmark

Resolution: fixed
Status: assignedclosed

Fixed in [13989]. FilteringSelect? passes the test in the ticket's description.

comment:6 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.