Skip to content

Commit

Permalink
fix: create stable references for hook dependency arrays: Accordion, …
Browse files Browse the repository at this point in the history
…Icon
  • Loading branch information
jamiehenson committed Dec 16, 2024
1 parent 9cdcbf7 commit 072d2b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ably/ui",
"version": "15.1.8",
"version": "15.1.9",
"description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion src/core/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ const Accordion = ({
: indexValues.filter((_, index) =>
options?.defaultOpenIndexes?.includes(index),
);
}, [options?.defaultOpenIndexes, options?.fullyOpen, data.length]);
}, [
JSON.stringify(options?.defaultOpenIndexes),
options?.fullyOpen,
data.length,
]);

const [openRowValues, setOpenRowValues] = useState<string | string[]>(
openIndexes,
Expand Down
2 changes: 1 addition & 1 deletion src/core/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Icon = ({
size,
color,
additionalCSS,
additionalAttributes,
JSON.stringify(additionalAttributes),
lightSecondaryColor,
darkSecondaryColor,
],
Expand Down

0 comments on commit 072d2b8

Please sign in to comment.