Opened 8 years ago
Last modified 4 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 8 years ago by
comment:3 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
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/