Opened 9 years ago

Closed 9 years ago

#16860 closed defect (duplicate)

_FormSelectWidget forces store IDs to be string

Reported by: Alpha Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

From dojo 1.8.3, _FormSelectWidget.js, line 404.

array.forEach(newValue, function(i, idx){
                                i = i + ""; // (1)
                        if(typeof i === "string"){
                                newValue[idx] = array.filter(opts, function(node){
                                        return node.value === i;
                                })[0] || {value: "", label: ""};
                }, this);

The line marked as (1) forces all IDs to be stored as strings for a specific store values associated with the Select control. This forces all assignations done to be against strings since even a numeric value will not strictly match the available values for the store.

Example of issue:

Change History (6)

comment:1 Changed 9 years ago by Alpha

Can I please by added to the cc: of this ticket? I cannot add myself when

commenting on it, cannot do it when adding it, and cannot modify the ticket. Thanks.

Last edited 9 years ago by bill (previous) (diff)

comment:2 Changed 9 years ago by bill

Description: modified (diff)

Don't worry, you're automatically mailed about tickets you create on comment on. I fixed the example formatting in the summary.

comment:3 Changed 9 years ago by freddefisk

Duplicate of #11215, #11545, #12434 and #16290?

The first tickets was closed as invalid because this was the documented behaviour while #16290 fixes it anyway.

comment:4 Changed 9 years ago by Alpha

Thanks bill.

Hi freddefisk, thanks for that, it seems that it may be a duplicate. I will take a look at the patch provided in #16290 and the tests involved so I can see if this is the exact same case, but so far, it looks like it.

comment:5 Changed 9 years ago by Alpha

Hi fredefisk, I have verified and yes, this issue is a duplicate of the ones mentioned. #16290 correctly fixes it. You may close this ticket. Sorry, and thanks!

comment:6 Changed 9 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #16290.

Note: See TracTickets for help on using tickets.