We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 919c0c5 commit 58ab3b4Copy full SHA for 58ab3b4
web-common/src/features/dashboards/big-number/MeasuresContainer.svelte
@@ -152,10 +152,12 @@
152
calculateGridColumns();
153
}
154
155
- function getValue(key: string | undefined): number | null {
+ $: totalsQueryRow = totalsQueryResult.data?.data?.[0];
156
+ // Make this reactive to totalsQueryRow so that data is updated if query is refetched
157
+ $: getValue = (key: string | undefined): number | null => {
158
if (!key) return null;
- return totalsQueryResult.data?.data?.[0]?.[key] as number | null;
- }
159
+ return totalsQueryRow?.[key] as number | null;
160
+ };
161
</script>
162
163
<svelte:window on:resize={() => calculateGridColumns()} />
0 commit comments