I have implemented the React Dual Listbox library in my project. I have a update employee detail form where in the Listbox right hand side table, I need to show the items the user had selected previously while submitting basic detail form.
Now whenever I open the update form, I call an api which gives me the data (in my case a list of items) which user has selected previously while submitting the form. I use this data to prefill the react dual listbox right hand side table which shows the selected items. But, I am not able to prefill it. I used the selected attribute of the <DualListBox> tag by storing the array of items from the api into the selected array, but still was not able to show the prefilled data.
Please refer React Dual Listbox
How can I show the prefilled data?