diff --git a/components/lib/treeselect/TreeSelect.js b/components/lib/treeselect/TreeSelect.js index a5b135b9ba..2e88823bce 100644 --- a/components/lib/treeselect/TreeSelect.js +++ b/components/lib/treeselect/TreeSelect.js @@ -697,7 +697,7 @@ export const TreeSelect = React.memo( const createFilterElement = () => { if (props.filter) { - let filterValue = props.onFilterValueChange ? props.filterValue : filterValue; + let filterValue = props.onFilterValueChange ? props.filterValue : filteredValue; filterValue = ObjectUtils.isNotEmpty(filterValue) ? filterValue : ''; const filterContainerProps = mergeProps( diff --git a/components/lib/utils/DomHandler.js b/components/lib/utils/DomHandler.js index bcf1642b17..c5bb34337b 100644 --- a/components/lib/utils/DomHandler.js +++ b/components/lib/utils/DomHandler.js @@ -632,7 +632,7 @@ export default class DomHandler { }; for (let parent of parents) { - let scrollSelectors = parent.nodeType === 1 && parent.dataset.scrollselectors; + let scrollSelectors = parent.nodeType === 1 && parent.dataset?.scrollselectors; if (scrollSelectors) { let selectors = scrollSelectors.split(',');