Whenever the user selects an item in the datatable, the richselect options should adapt according to the ‘options’ attribute in ‘data’. However, all the options displayed are the same. What’s wrong with my code ?
Its actually a bug, code must work with and without providing separate “id” for each item.
While component expects that data objects have “id” property, it can autogenerate IDs automatically. In case of the richselect it has sense to provide the “id” anyway, as richselect will return id of item when you will use getValue or similar API.
Thank you. But now another question evolved:
Unfortunately the option list does not update immediately when the selection is changed, but when the user opens the popup for the first time. What I’d like to achieve is the following:
richselect option list should update immediately on selection change in dataview, even if the popup is not opened
first item of option list should be selected
form should update according to selection
I think I must emit an event which forces the richselect to update its option list and attach it to the dataview’s ‘onSelectionChanged’ event. Which is the best way to do this?