Fix: collapse expanded values on measure change #5165
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Temporary fix for https://rilldata.slack.com/archives/CTZ8XBQ85/p1719374514886679
We don't have support for asynchronous calls in our pivot data store. To fetch the values for a particular nested sub-table, we need to know the values of its parents. This generally works well when a user expands the table one by one. However, if we attempt to call everything at once, we need an asynchronous way to handle data in the Svelte store. This is also why implementing an "Expand All" feature would require a significant refactor. Currently, we are looking at ways to fix it so that we at least don't show incorrect data. One solution could be to collapse all expanded values when measures are changed.
A follow up for this would be to add support for asynchronous sequential calls.