Skip to content

Commit 226bc93

Browse files
authored
Fix #7867: TreeSelect filterDelay fix (#7870)
1 parent 65e8792 commit 226bc93

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

components/lib/treeselect/TreeSelect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,9 @@ export const TreeSelect = React.memo(
684684

685685
const createFilterElement = () => {
686686
if (props.filter) {
687-
let filterValue = props.onFilterValueChange ? props.filterValue : filteredValue;
687+
let newValue = props.onFilterValueChange ? props.filterValue : filterValue;
688688

689-
filterValue = ObjectUtils.isNotEmpty(filterValue) ? filterValue : '';
689+
newValue = ObjectUtils.isNotEmpty(newValue) ? newValue : '';
690690
const filterContainerProps = mergeProps(
691691
{
692692
className: cx('filterContainer')
@@ -697,7 +697,7 @@ export const TreeSelect = React.memo(
697697
{
698698
ref: filterInputRef,
699699
type: 'text',
700-
value: filterValue,
700+
value: newValue,
701701
autoComplete: 'off',
702702
className: cx('filter'),
703703
placeholder: props.filterPlaceholder,

0 commit comments

Comments
 (0)