PDA

View Full Version : Combo box with same displayField values causing wrong selection.



armandoxxx
24 Feb 2012, 2:22 AM
Hey ...

Need a little heklp with my remote combo box ..
config:



allowBlank: false
displayField: "title"
fieldLabel: ""
hiddenName: undefined
hideParent: true
id: "some-id"
lazyRender: true
minChars: 2
mode: "remote"
queryParam: "searchStr"
removeMode: "container"
store: SomeStore
triggerAction: "all"
typeAhead: true
valueField: "uuid"
width: 400



I load data from store, and some items have same title but different UUID;



[
{uuid: '1', title, 'a'},
{uuid: '2', title, 'b'},
{uuid: '3', title, 'c'},
{uuid: '4', title, 'a'}
]

when I select the fourth item, the first one is selected ... what am I doing wrong ..


combobox.getValue() //returns 1 instead of 4


Kind regards

Armando

darthwes
24 Feb 2012, 7:57 AM
You mean when you select 'd' from the combobox, and then call getValue it returns 1?