@@ -128,8 +128,6 @@ function isRawValue(value: SafeKey | LabeledValueType): value is SafeKey {
128
128
return ! value || typeof value !== 'object' ;
129
129
}
130
130
131
- const OMIT_DOM_PROPS = [ 'treeNodeFilterProp' , 'filterTreeNode' ] ;
132
-
133
131
const TreeSelect = React . forwardRef < BaseSelectRef , TreeSelectProps > ( ( props , ref ) => {
134
132
const {
135
133
id,
@@ -144,7 +142,12 @@ const TreeSelect = React.forwardRef<BaseSelectRef, TreeSelectProps>((props, ref)
144
142
145
143
// Search
146
144
showSearch,
147
-
145
+ searchValue : legacySearchValue ,
146
+ inputValue : legacyinputValue ,
147
+ onSearch : legacyOnSearch ,
148
+ autoClearSearchValue : legacyAutoClearSearchValue ,
149
+ filterTreeNode : legacyFilterTreeNode ,
150
+ treeNodeFilterProp : legacytreeNodeFilterProp ,
148
151
// Selector
149
152
showCheckedStrategy,
150
153
treeNodeLabelProp,
@@ -204,7 +207,15 @@ const TreeSelect = React.forwardRef<BaseSelectRef, TreeSelectProps>((props, ref)
204
207
const mergedLabelInValue = treeCheckStrictly || labelInValue ;
205
208
const mergedMultiple = mergedCheckable || multiple ;
206
209
207
- const [ mergedShowSearch , searchConfig ] = useSearchConfig ( showSearch , props ) ;
210
+ const searchProps = {
211
+ searchValue : legacySearchValue ,
212
+ inputValue : legacyinputValue ,
213
+ onSearch : legacyOnSearch ,
214
+ autoClearSearchValue : legacyAutoClearSearchValue ,
215
+ filterTreeNode : legacyFilterTreeNode ,
216
+ treeNodeFilterProp : legacytreeNodeFilterProp ,
217
+ } ;
218
+ const [ mergedShowSearch , searchConfig ] = useSearchConfig ( showSearch , searchProps ) ;
208
219
const {
209
220
searchValue,
210
221
onSearch,
@@ -745,13 +756,12 @@ const TreeSelect = React.forwardRef<BaseSelectRef, TreeSelectProps>((props, ref)
745
756
displayValues = { cachedDisplayValues }
746
757
onDisplayValuesChange = { onDisplayValuesChange }
747
758
// >>> Search
748
- { ... searchConfig }
759
+ autoClearSearchValue = { autoClearSearchValue }
749
760
showSearch = { mergedShowSearch }
750
761
searchValue = { mergedSearchValue }
751
762
onSearch = { onInternalSearch }
752
763
// >>> Options
753
764
OptionList = { OptionList }
754
- omitDomProps = { OMIT_DOM_PROPS }
755
765
emptyOptions = { ! mergedTreeData . length }
756
766
onPopupVisibleChange = { onInternalPopupVisibleChange }
757
767
popupMatchSelectWidth = { popupMatchSelectWidth }
0 commit comments