I have an attribute on one of my models that is an array of string urls. I would like to edit this with a text field for each item in the array, with the ability to add or remove items. Has anyone done this before?
I don’t believe I can edit the array directly, so my guess is I need to map the array to an array of objects, e.g.
Hmm… that’s showing a later version where I got it to half work. The original version I tried to send just used the same getter/setter computed property like your example shows, but it never calls it as a setter.
The later version works for a single character, but then the input loses focus.
I ended up writing a custom transform to convert arrays into objects, e.g. [1, 2] -> { item: 1, index: 0 }, { item: 2, index: 1 } which seems to be working reasonably well.