Class toggle works on Array but not Data Store?

We were using an array to store some data but dropped the idea and replaced with a Data Store. There is a simple class toggle to set opacity when the images uid is found in the array. This all worked fine.

dmx-class:opacity-40="selectedmediaitemarray.items.contains(mediaLibraryItemUID)"

BUT… When we try to apply the same to the replacement Data Store the toggle does not apply?

dmx-class:opacity-40="cmpSelectedMediaItems.data[0].contains(mediaLibraryItemUID)"

Or.

dmx-class:opacity-40="cmpSelectedMediaItems.contains(mediaLibraryItemUID)"

Neither way seems to work? Am I being daft? The data store is called ‘cmpSelectedMediaItems’. Any advice on rectification would be most obliged kind people! maybe its a Friday thing…?

:smiley:

Community Page
Last updated: