Skip to content

Commit

Permalink
Merge pull request #40 from feedzai/releases
Browse files Browse the repository at this point in the history
Support for dynamic data / DOM elements
  • Loading branch information
DiogoRDuarte authored Oct 24, 2024
2 parents 63c7fa5 + 37c3747 commit 978bf24
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## 2.0.2 - 2024-10-24
### Added
- Dynamic changes in the data or DOM elements now trigger updates in the tool

## 2.0.1 - 2024-10-08
### Added
- Aligned native ShortcutGuide styling with the prototypes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@feedzai/autovizua11y",
"description": "AutoVizuA11y is a React library that automates the process of creating accessible data visualizations",
"private": false,
"version": "2.0.1",
"version": "2.0.2",
"author": "Feedzai",
"license": "AGPL-3.0",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/AutoVizuA11y.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const AutoVizuA11y = ({
const SELECTOR = selectorType.element || `.${selectorType.className ?? ""}`;
const NEW_ELEMENTS = Array.from(chartRef.current.querySelectorAll(SELECTOR)) as HTMLElement[];
setElements(NEW_ELEMENTS);
}, [chartRef, selectorType]);
}, [chartRef, selectorType, data, children]);

useEffect(() => {
const initSeries = () => {
Expand Down Expand Up @@ -295,7 +295,7 @@ const AutoVizuA11y = ({
return () => clearTimeout(timer);
};
asyncEffect();
}, [chartRef]);
}, [chartRef, data, children]);

const handleOnKeyDown = useCallback(
(event: React.KeyboardEvent<HTMLDivElement>) => {
Expand Down

0 comments on commit 978bf24

Please sign in to comment.