Skip to content

Commit 189a548

Browse files
committed
fix(vc-tree-select): showSearch=false is invalid vueComponent#4119
1 parent c0643fd commit 189a548

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/tree-select/index.tsx

+1-2
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 {
@@ -152,10 +151,10 @@ const TreeSelect = defineComponent({
152151

153152
// showSearch: single - false, multiple - true
154153
let { showSearch } = restProps;
154+
debugger;
155155
if (!('showSearch' in restProps)) {
156156
showSearch = !!(restProps.multiple || restProps.treeCheckable);
157157
}
158-
159158
let checkable = getComponent(this, 'treeCheckable');
160159
if (checkable) {
161160
checkable = <span class={`${prefixCls}-tree-checkbox-inner`} />;

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

+1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ const SearchInput = {
146146
onKeydown={onSearchInputKeyDown}
147147
value={searchValue}
148148
disabled={disabled}
149+
readonly={!this.$attrs.showSearch}
149150
class={`${prefixCls}-selection-search-input`}
150151
aria-label="filter select"
151152
aria-autocomplete="list"

0 commit comments

Comments
 (0)