Skip to content

Commit

Permalink
Merge pull request #1215 from visualize-admin/fix/interactive-segment…
Browse files Browse the repository at this point in the history
…-filters-toggle

fix: Interactive segment filters toggle
  • Loading branch information
bprusinowski authored Oct 12, 2023
2 parents 0a76391 + 8677184 commit 8dcbe36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ You can also check the [release page](https://github.com/visualize-admin/visuali
- Added a new group of charts – Combo charts – that includes multi-measure line, dual-axis line and column-line charts
- Added a way to edit and remove charts for logged in users
- Improved user profile page
- Fixes
- It's now again possible to enable interactive segment filters

# [3.22.9] - 2023-10-06

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ export const useInteractiveFiltersToggle = (target: "legend") => {
const chartConfig = getChartConfig(state);
const onChange = useEvent((e: ChangeEvent<HTMLInputElement>) => {
if (chartConfig.interactiveFiltersConfig?.[target]) {
chartConfig.interactiveFiltersConfig[target].active =
e.currentTarget.checked;
}
const newConfig = produce(
chartConfig.interactiveFiltersConfig,
(draft) => {
draft[target].active = e.currentTarget.checked;
}
);

dispatch({
type: "INTERACTIVE_FILTER_CHANGED",
value: chartConfig.interactiveFiltersConfig,
});
dispatch({
type: "INTERACTIVE_FILTER_CHANGED",
value: newConfig,
});
}
});

const stateValue = get(
Expand Down

1 comment on commit 8dcbe36

@vercel
Copy link

@vercel vercel bot commented on 8dcbe36 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

visualization-tool – ./

visualization-tool-alpha.vercel.app
visualization-tool-ixt1.vercel.app
visualization-tool-git-main-ixt1.vercel.app

Please sign in to comment.