Skip to content

Commit 799559d

Browse files
authored
fix: fix crash in Blueprints.js SearchInput renderer
13118cd 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: #197
1 parent e3fb44b commit 799559d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/blueprintjs-renderers/src/renderers.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,13 @@ export const renderers: TreeRenderProps = {
165165
</form>
166166
),
167167

168-
renderSearchInput: props => (
169-
<div className={cx('rct-tree-search-input-container')}>
170-
<InputGroup {...(props.inputProps as any)} placeholder="Search..." />
171-
</div>
172-
),
168+
renderSearchInput: props => {
169+
const { ref, ...inputProps } = {...props.inputProps};
170+
return (
171+
<div className={cx('rct-tree-search-input-container')}>
172+
<InputGroup intputRef={ref} {...(inputProps as any)} placeholder="Search..." />
173+
</div>
174+
)},
173175

174176
renderDepthOffset: 1,
175177
};

0 commit comments

Comments
 (0)