Opened 6 years ago

Closed 6 years ago

#17171 closed defect (worksforme)

dijit/form/Select not keeping item order from store

Reported by: Frederic Canteloup Owned by: Douglas Hays
Priority: undecided Milestone: 1.9.1
Component: Dijit - Form Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hello,

I have migrated my code to dojo 1.9.0 and have observed the following : Upon creating a dijit/form/Select (either declaratively or programmatically) linked to a store, the original order of store items is not kept in the select. I have tried with a Memory and a JsonRest?.

In the test case below, 'June' ends up in first position followed by the 2 'May' entries :

var store = new dojo.store.Memory({
			data: [
			{ id: "201305", label: "May 2013" },
			{ id: "201306", label: "June 2013" },
			{ id: "201405", label: "May 2014" }
			       ]
		      });

new dijit.form.Select({
	store : new ObjectStore({objectStore:watchedDateComboStore}),
		}, "myDivId");

Thanks in advance for your help

Attachments (1)

testcase.html (1.1 KB) - added by Frederic Canteloup 6 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by bill

Description: modified (diff)
Milestone: tbd1.9.1
Summary: dijit/form/Select not keeping item order from store[regression] dijit/form/Select not keeping item order from store

That's odd. It would be better if you could attach a full test case using the "attach file" button but anyway if this is a regression we should take a look.

Changed 6 years ago by Frederic Canteloup

Attachment: testcase.html added

comment:2 Changed 6 years ago by Frederic Canteloup

Thanks for your quick reply. Please find in attachment a testcase.html file with all css and js paths relative, assuming the dojo folder is in the same folder as the testcase. Hope it helps.

Frederic.

Last edited 6 years ago by Frederic Canteloup (previous) (diff)

comment:3 Changed 6 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed
Summary: [regression] dijit/form/Select not keeping item order from storedijit/form/Select not keeping item order from store

Specify sortByLabel:false

Note: See TracTickets for help on using tickets.