Opened 6 years ago

Last modified 2 years ago

#16606 new defect

dojox/form/CheckedMultiSelect does not allow for programatically clearing value

Reported by: Justin Doherty Owned by: dante
Priority: undecided Milestone: 1.15
Component: DojoX Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

It is currently not possible to clear all the check boxes in a CheckedMultiSelect? programmatically using the value setter.

Neither obj.set("value", []) or obj.set("value", "") or other variations seem to work. As a workaround we are currently calling onChange after setting the value however this is far from ideal.

Adding the following to the first test in test_CheckedMultiSelect.html shows the problem:

t.is([], form.get("value").ms1);
ms1.set("value", ["TN","CA"]);

I believe the issue was caused by the changes in Ticket #15141 with the addition of this line:

if(typeof val == "undefined" || typeof val[0] == "undefined"){ return; } // not fully initialized yet or a failed value lookup

Change History (3)

comment:1 Changed 6 years ago by Becca Stewart

Calling reset() on the CheckedMultiSelect? or on the Form it belongs to does ensure none of the options are selected. But I have found that _updateSelection() must be called to update the ComboButton? text. And because of #17103, the iconClass must be updated manually as well.

http://jsfiddle.net/down_quark/cNATk/2/

comment:2 Changed 3 years ago by dylan

Milestone: tbd1.12

Will consider for 1.12 or 1.13.

comment:3 Changed 2 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.