Skip to content

Commit

Permalink
fix timeslice chaining in react embeddable control group
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Jul 22, 2024
1 parent d8302eb commit 080a9d8
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ export function controlGroupFetch$(
}
if (!parentIgnoreSettings?.ignoreTimerange && parentApi.timeRange$) {
observables.push(parentApi.timeRange$);
if (parentApi.timeslice$) {
observables.push(parentApi.timeslice$);
}
}
if (apiPublishesReload(parentApi)) {
observables.push(parentApi.reload$);
Expand All @@ -61,13 +58,7 @@ export function controlGroupFetch$(
timeRange:
parentIgnoreSettings?.ignoreTimerange || !parentApi.timeRange$
? undefined
: parentApi.timeslice$?.value
? {
from: new Date(parentApi.timeslice$?.value[0]).toISOString(),
to: new Date(parentApi.timeslice$?.value[1]).toISOString(),
mode: 'absolute' as 'absolute',
}
: (parentApi as PublishesUnifiedSearch).timeRange$.value,
: parentApi.timeRange$.value,
};
})
);
Expand Down

0 comments on commit 080a9d8

Please sign in to comment.