I want the user to be able to remove existing options from the selectedvar and then save it.
The problem is when I attempt to remove any instructions or add new ones, it doesn’t work. when I remove the instruction, all the instructions are deleted from the multiselect element. When I try to add a new instruction, it doesn’t show up in the multiselect element.
How do I allow users to edit the instruction groups?
To display your initial value, you need to do like your first screenshot. And use the function map with the “id”
You need to do that, because value field you defined for your option is “id”, so the initial value need to be a list of id
I am not sure to understand the second point of editing. Could you give us more detail?
Hi Mael! I have tried to map the function to the id, and the initial value shows up correctly, it’s just that when I attempt to remove any instructions, all the instructions disappear.
And then when I attempt to add any instructions from the dropdown (options binded to Xano collection), nothing happens…
When I try to remove any of the 2 options, all of it disappears. When I try to open the dropdown and select another option and click on it, nothing happens.
I think the issue is that you don’t have the same format for selectedInEditor after your on Change, so your formula that you are using for the initial value is no more working, and you created an issue
I don’t have a visibility of the format of your variable at the beginning, so it is difficult to give you detail, but it seems to be the issue
And on change, you shouldn’t use the variable .... - current selection. You should use event.value