mercredi 14 juin 2017

Observe a change in a boolean array

I have a component that observes an array of items:

itemsChanged: Ember.observer('items', 'items.[]', 'items.@each' function () {
    // ...code...
}),

This works fine when I have an array of objects with a boolean property.

Array(arraySize).fill(false, 0).fill(true, 0, 1).map(model => WrapperBool.create({ model }))

However, how can I make it observe when an array of booleans have a value change? The array will always be the same size.

Array(arraySize).fill(false, 0).fill(true, 0, 1)




Aucun commentaire:

Enregistrer un commentaire