Skip to content

Commit

Permalink
fix: When the searchRender of the Tree is false, remove the excess pa…
Browse files Browse the repository at this point in the history
…dding at the top
  • Loading branch information
YyumeiZhang committed Jul 31, 2024
1 parent fe08977 commit 1a0e244
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/semi-ui/tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ class Tree extends BaseComponent<TreeProps, TreeState> {
searchPlaceholder,
showClear
} = this.props;
if (searchRender === false) {
return null;
}
const inputcls = cls(`${prefixcls}-input`);
const { inputValue } = this.state;
const inputProps = {
Expand All @@ -559,9 +562,6 @@ class Tree extends BaseComponent<TreeProps, TreeState> {
if (isFunction(searchRender)) {
return searchRender({ ...inputProps });
}
if (searchRender === false) {
return null;
}
return (
<Input
aria-label='Filter Tree'
Expand Down

0 comments on commit 1a0e244

Please sign in to comment.