Skip to content

Commit

Permalink
fix: reset domain when cancel filter in live preview
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Oct 15, 2024
1 parent 5fa9fd1 commit 1700a70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/component/reducer/actions/FiltersActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,15 @@ function rollbackSpectrumByFilter(
draft.toolOptions.data.activeFilterID = null;
draft.tempData = null;

if (datum.filters.length > 0 && filterIndex !== -1) {
if (filterIndex !== -1 && datum.filters.length > 0) {
updateDomainOptions = getFilterDomain(datum, {
startIndex: filterIndex,
lastIndex: datum.filters.length - 1,
});
} else {
updateDomainOptions = { updateXDomain: true, updateYDomain: true };
}

const {
toolOptions: { data },
} = getInitialState();
Expand Down

0 comments on commit 1700a70

Please sign in to comment.