On the client side, I want to use a repeat on a list of contacts coming from a datastore and a .where() something like this:
contacts.data.where(`is_a_demo`, show_demo_data.value, "fuzzy_function")
Where by if:
-
show_demo_data.value==1
I want contacts with all values ofis_a_demo
to be selected -
show_demo_data.value==0
I want only contacts where is_a_demo==0 to be selected
How can i do that?
Note that in the actual implementation I already have a preceeding ternary condition:
some_checkbox.checked?contacts.data.several_wheres:contacts.data.several_other_wheres
So putting it in a ternary operation is going to get too complex…
And the data isn’t coming from a server action so I can’t use conditional conditions on a query!
Community Page
Last updated:
Last updated: