This issue original raise on github of alpaca framework, https://github.com/gitana/alpaca/issues/731
Just open one here for getting support from stackoverflow community.
A Combination of multi select and array cause a problem that the second and later select boxes inherit the selection status of their former siblings.
See my codepen: https://codepen.io/hadakadenkyu/full/pooKyzy
any help would be appreciated!!
Your issue was related to the object
datasource
that you've created. Internally alpacajs transforms yourdatasource
object to text and value, and it needs it to be only of type{key: value}
so in your example you should do{"2001": 2002}
for example.Moreover, in your alpaca form data object you should use select option values not text like:
year: ["2001", "2003"]
Update: I rechecked the documentation and I saw:
So to make your example works you should wrap your
datasource
object value into a function like:Here's the first example.
Here's the second example.