I have a lightning combobox with data set up kind of like:
[
{
'label':'blah',
'value':'bleh',
'otherThing':'test',
'finalThing':'another test'
},
{
'label':'blah2',
'value':'bleh2',
'otherThing':'test2',
'finalThing':'another test2'
}
]
The combobox applies the label to what you see in the drop down and when something is selected, which is good. And the value is in combobox.get('v.value'), which is also good.
But can I get my other items in the combobox option, like otherThing and finalThing?
Simply doing combobox.get('v.otherThing')
did nothing. Is the only way to get anything other than the value (even label, even though we can see it) is to always have to store the options in an aura:attribute list and iterate over them to match values?
Being able to actually get the entire option object instead of just the value seems like a simple thing that should be there, but perhaps it isn't? Is it possible to get the entire object of the selected option in a lightning combobox?