Skip to content

Commit

Permalink
Do not show search prompty if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jes490 committed Feb 12, 2024
1 parent fd10ba6 commit 27f731c
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 11 deletions.
5 changes: 4 additions & 1 deletion dist/vue-treeselect.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-treeselect.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-treeselect.cjs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-treeselect.cjs.min.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/vue-treeselect.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-treeselect.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-treeselect.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-treeselect.umd.min.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,15 @@
renderAsyncSearchMenuInner() {
const { instance } = this
const entry = instance.getRemoteSearchEntry()
const shouldShowSearchPromptTip = instance.trigger.searchQuery === ''
&& !instance.defaultOptions
&& instance.searchPromptText
const shouldShowSearchPromptTip = instance.trigger.searchQuery === '' && !instance.defaultOptions
const shouldShowNoResultsTip = shouldShowSearchPromptTip
? false
: entry.isLoaded && entry.options.length === 0
if (shouldShowSearchPromptTip) {
if (!instance.searchPromptText) {
return ''
}
return this.renderSearchPromptTip()
} else if (entry.isLoading) {
return this.renderLoadingOptionsTip()
Expand Down

0 comments on commit 27f731c

Please sign in to comment.