Opened 9 years ago

Closed 4 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 6 years ago by Kitson Kelly

Owner: changed from dante to Kitson Kelly
Status: newassigned

comment:2 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

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 ).

Note: See TracTickets for help on using tickets.