Skip to content

Commit 7d648b3

Browse files
authored
chore: Merge pull request #199 from dlech/patch-1
fix: fix crash in Blueprints.js SearchInput renderer
2 parents acaaafd + 471374b commit 7d648b3

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

packages/blueprintjs-renderers/src/renderers.tsx

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

168-
renderSearchInput: props => (
169-
<div className={cx('rct-tree-search-input-container')}>
170-
<InputGroup
171-
autoFocus
172-
{...(props.inputProps as any)}
173-
placeholder="Search..."
174-
/>
175-
</div>
176-
),
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+
)},
177175

178176
renderDepthOffset: 1,
179177
};

0 commit comments

Comments
 (0)