Our powerful JS Calendar component


Post by danabrey »

Hey!

I'm trying to use a List component to represent a list of options from a resourceStore, a bit like a resourceFilter but with custom handling. However, I can't seem to find a way to react to changes after they've been committed to state. Listening to the onItem event allows me to see this.selected, but this contains the previous state prior to the click of that item.

Is there a better way to access the up to date state on click of an item?

Many thanks


Post by mats »

I see the issue yes, we'll look into this: https://github.com/bryntum/support/issues/3294


Post by danabrey »

Thanks! Is there any workaround you can think of in the meantime?

Appreciate the reply.


Post by Animal »

As a workaround, listen to the change event of the List's selected Collection.

myList.selected.on('change',...)

https://www.bryntum.com/docs/scheduler/#Core/util/Collection#event-change

Really, List should get its own selectionchange event. Grid has one...


Post by danabrey »

Ah, thanks for that, didn't know Collections have their own events like that. Cheers.


Post Reply