Skip to content

How to reactively execute query when selections change and display results? #216

Answered by jheer
willeppy asked this question in Q&A
Discussion options

You must be logged in to vote

One complication here is that a selection does not correspond to a single "filtered set" of data. It corresponds to one or more filter predicate sets. For example, in the case of cross-filtering, each client might use a different filtered data subset. So the first question is to figure out which filtered set you want. You can generate the filter conditions by calling selection.predicate(client), which will return a set of WHERE clause predicates specific to the provided client. If no client is provided, you should get all filter predicates from all clients registered with that selection. You could then use the result of selection.predicate() to filter your query in getCount().

For example:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@willeppy
Comment options

Answer selected by willeppy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants