"any()" equivalent in a state var? #3815
DeepQuantum
announced in
Q&A
Replies: 1 comment
-
you could use a cached computed var that computed a dictionary for each row and then index into that dictionary by row id or similar identifier |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I've been struggling with trying to find out if any value inside a list state var matches a condition. My state has a list of objects (broadcasters) with a name. The same state also has a list of paths, I now want to check for each path if any of the broadcasters names is contained within it. So for instance:
The result of this will then be assigned to the
checked
value of a switch in my UI. I've tried using foreach, but that hasn't worked so far (and also doesnt really seem appropriate in the first place, as it's not really meant to be used for assigning values). I've also tried a method within the state itself that takes a path as an argument (because we need to do this for each path), without success:Is there an elegant way to achieve this? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions