From 5f814e392869618f1099fe05eead0ab76a107d31 Mon Sep 17 00:00:00 2001 From: MartynasStrazdas <43886789+MartynasStrazdas@users.noreply.github.com> Date: Wed, 5 Aug 2026 09:37:47 +0300 Subject: [PATCH] Change --- .changeset/yellow-kings-cut.md | 5 +++++ .../api/presentation-hierarchies-react-extract.api.md | 2 +- .../presentation-hierarchies-react/stratakit/TreeAction.tsx | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/yellow-kings-cut.md diff --git a/.changeset/yellow-kings-cut.md b/.changeset/yellow-kings-cut.md new file mode 100644 index 000000000..e8b044276 --- /dev/null +++ b/.changeset/yellow-kings-cut.md @@ -0,0 +1,5 @@ +--- +"@itwin/presentation-hierarchies-react": patch +--- + +`TreeActionBase`: Made the `onClick` prop optional. diff --git a/packages/hierarchies-react/api/presentation-hierarchies-react-extract.api.md b/packages/hierarchies-react/api/presentation-hierarchies-react-extract.api.md index 7e55b7ed3..a8196daa0 100644 --- a/packages/hierarchies-react/api/presentation-hierarchies-react-extract.api.md +++ b/packages/hierarchies-react/api/presentation-hierarchies-react-extract.api.md @@ -224,7 +224,7 @@ export interface TreeActionBaseAttributes { // @alpha (undocumented) type TreeActionBaseProps = Omit, "onClick"> & TreeActionBaseAttributes & { - onClick: () => void; + onClick?: () => void; }; // @alpha diff --git a/packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/TreeAction.tsx b/packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/TreeAction.tsx index 913ae4d75..f86e8ae42 100644 --- a/packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/TreeAction.tsx +++ b/packages/hierarchies-react/src/presentation-hierarchies-react/stratakit/TreeAction.tsx @@ -35,7 +35,7 @@ export interface TreeActionBaseAttributes { export type TreeActionBaseProps = Omit, "onClick"> & TreeActionBaseAttributes & { /** Callback invoked when the action is clicked. */ - onClick: () => void; + onClick?: () => void; }; /**