Opened 11 years ago
Closed 5 years ago
#10931 closed defect (patchwelcome)
dojox.form.CheckedMultiSelect does not work if the values in store are typeof number
Reported by: | Ferdinand Weinberger | Owned by: | Kitson Kelly |
---|---|---|---|
Priority: | high | Milestone: | 1.13 |
Component: | DojoX Form | Version: | 1.4.2 |
Keywords: | Cc: | mcmatrix | |
Blocked By: | Blocking: |
Description
its not possible to check the checkbox if the value-property is a number. examples: data1 is working, data2 is not working using dojo.data.ItemFileReadStore?
var data1 = {
identifier: "value", label: "label", items: [
{value: "1", label: "Alabama"}, {value: "2", label: "Alaska"}, {value: "3", label: "Arizona"}, {value: "4", label: "Arkansas"}, {value: "5", label: "California"}, {value: "6", label: "Colorado"}, {value: "7", label: "Connecticut"}
]
};
var data2 = {
identifier: "value", label: "label", items: [
{value: 1, label: "Alabama"}, {value: 2, label: "Alaska"}, {value: 3, label: "Arizona"}, {value: 4, label: "Arkansas"}, {value: 5, label: "California"}, {value: 6, label: "Colorado"}, {value: 7, label: "Connecticut"}
]
};
i found that there is a problem in _setValueAttr of dijit.form._FormSelectWidget Line 295 ... return node.value === i; ...
should changed to return String(node.value) === i;
a working example: http://pastie.org/900037
Change History (2)
comment:1 Changed 8 years ago by
Owner: | changed from dante to Kitson Kelly |
---|---|
Status: | new → assigned |
comment:2 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | assigned → closed |
Unfortunately still an issue. Given the lack of interest over the past 6 years, I'm closing it as patchwelcome. If there's interest in revisiting this please re-open with a pull request per our contribution guidelines ( https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md ).