Skip to content

Commit b91659e

Browse files
authored
fix(vc-tree-select): showSearch=false is invalid #4119 (#4125)
* fix(vc-tree-select): `showSearch=false` is invalid #4119 * style: remove debugger * style: update * refactor: update
1 parent f091582 commit b91659e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

components/tree-select/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const TreeSelect = defineComponent({
2626
props: initDefaultProps(TreeSelectProps(), {
2727
transitionName: 'slide-up',
2828
choiceTransitionName: '',
29-
showSearch: false,
3029
}),
3130
setup() {
3231
return {

components/vc-tree-select/src/SearchInput.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const SearchInput = {
2121
needAlign: PropTypes.looseBool,
2222
ariaId: PropTypes.string,
2323
isMultiple: PropTypes.looseBool.def(true),
24+
showSearch: PropTypes.looseBool,
2425
},
2526
emits: ['mirrorSearchValueChange'],
2627
setup(props, { emit }) {
@@ -126,6 +127,7 @@ const SearchInput = {
126127
open,
127128
ariaId,
128129
isMultiple,
130+
showSearch,
129131
} = this.$props;
130132
const {
131133
vcTreeSelect: { onSearchInputKeyDown },
@@ -146,6 +148,7 @@ const SearchInput = {
146148
onKeydown={onSearchInputKeyDown}
147149
value={searchValue}
148150
disabled={disabled}
151+
readonly={!showSearch}
149152
class={`${prefixCls}-selection-search-input`}
150153
aria-label="filter select"
151154
aria-autocomplete="list"

0 commit comments

Comments
 (0)