File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -167,14 +167,19 @@ const reverseISearch = event => {
167
167
// TODO
168
168
// console.debug(event)
169
169
}
170
+ // Shows a user defined help text as placeholder after timeout millseconds
170
171
const showDelayedHelp = () => {
172
+ if (and (! showHelp, isOutdated .value )) {
173
+ return
174
+ }
175
+
171
176
const timeout = setTimeout (() => {
172
177
placeholder .value = helpText
173
178
}, helpTimeout)
174
179
175
- const unwatchIsDisabled = watch (isOutdated, () => {
180
+ const unwatchIsOutdated = watch (isOutdated, () => {
176
181
clearTimeout (timeout)
177
- unwatchIsDisabled ()
182
+ unwatchIsOutdated ()
178
183
})
179
184
}
180
185
// Deactivates this query and dispatches it to execute the command
@@ -217,9 +222,7 @@ onMounted(() => {
217
222
focus ()
218
223
219
224
// Show eventually help as placeholder
220
- if (and (showHelp, ! isOutdated .value )) {
221
225
showDelayedHelp ()
222
- }
223
226
})
224
227
225
228
defineExpose ({
You can’t perform that action at this time.
0 commit comments