From 799559d0f75e8cae548616afbe3a1dd55ce1bb27 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 17 Dec 2022 11:29:49 -0600 Subject: [PATCH] fix: fix crash in Blueprints.js SearchInput renderer https://github.com/lukasbach/react-complex-tree/commit/13118cda5406decaa39b18d58cbe59a8f37590ee introduced a `ref` property to the `inputProps` of `SearchInput`. This is not compatible with the `ref` property of the Blueprints.js `InputGroup` component and needs to be passed to the `inputRef` property instead. Fixes: https://github.com/lukasbach/react-complex-tree/issues/197 --- packages/blueprintjs-renderers/src/renderers.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/blueprintjs-renderers/src/renderers.tsx b/packages/blueprintjs-renderers/src/renderers.tsx index c97de279b..8bff751a2 100644 --- a/packages/blueprintjs-renderers/src/renderers.tsx +++ b/packages/blueprintjs-renderers/src/renderers.tsx @@ -165,11 +165,13 @@ export const renderers: TreeRenderProps = { ), - renderSearchInput: props => ( -
- -
- ), + renderSearchInput: props => { + const { ref, ...inputProps } = {...props.inputProps}; + return ( +
+ +
+ )}, renderDepthOffset: 1, };