Ticket #6382 (closed defect: fixed)

Opened 8 months ago

Last modified 6 months ago

reset() on FilteringSelect not allowed if no "initial value" given

Reported by: wolfram Owned by: haysmark
Priority: normal Milestone: 1.2
Component: Dijit Version: 1.1.0
Severity: normal Keywords:
Cc: nathan

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

patch6382.diff (0.6 kB) - added by wolfram 8 months ago.

Change History

Changed 8 months ago by wolfram

Changed 8 months ago by wolfram

  • summary changed from reset() on FilteringSelect not allowed if no "initial value" given to [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.

Changed 8 months ago by doughays

  • owner set to haysmark
  • milestone set to 1.2

Changed 7 months 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.

Changed 7 months ago by haysmark

  • status changed from new to assigned
  • summary changed from [patch] [cla] reset() on FilteringSelect not allowed if no "initial value" given to 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.

Changed 6 months ago by haysmark

  • status changed from assigned to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.