@dataloop-ai/components 0.20.261-new-input.2 → 0.20.261-new-input.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1358,6 +1358,14 @@ export default defineComponent({
|
|
|
1358
1358
|
const inputRef = this.$refs.input as HTMLInputElement
|
|
1359
1359
|
inputRef.blur()
|
|
1360
1360
|
},
|
|
1361
|
+
closeSuggestionMenuAfterBlur(): void {
|
|
1362
|
+
// Delay close so suggestion item click can finish before menu teardown.
|
|
1363
|
+
setTimeout(() => {
|
|
1364
|
+
if (!this.focused) {
|
|
1365
|
+
this.isMenuOpen = false
|
|
1366
|
+
}
|
|
1367
|
+
}, 0)
|
|
1368
|
+
},
|
|
1361
1369
|
onBlur(e: InputEvent): void {
|
|
1362
1370
|
const el = e.target as HTMLElement
|
|
1363
1371
|
el.innerText = (el.innerText ?? '').endsWith('.')
|
|
@@ -1365,7 +1373,7 @@ export default defineComponent({
|
|
|
1365
1373
|
: el.innerText
|
|
1366
1374
|
el.scroll(0, 0)
|
|
1367
1375
|
this.focused = false
|
|
1368
|
-
this.
|
|
1376
|
+
this.closeSuggestionMenuAfterBlur()
|
|
1369
1377
|
this.$emit('blur', e)
|
|
1370
1378
|
this.handleValueTrim()
|
|
1371
1379
|
},
|
|
@@ -1382,7 +1390,7 @@ export default defineComponent({
|
|
|
1382
1390
|
},
|
|
1383
1391
|
onNativeBlur(e: FocusEvent): void {
|
|
1384
1392
|
this.focused = false
|
|
1385
|
-
this.
|
|
1393
|
+
this.closeSuggestionMenuAfterBlur()
|
|
1386
1394
|
this.$emit('blur', e)
|
|
1387
1395
|
},
|
|
1388
1396
|
onNativeEnterPress(e: KeyboardEvent): void {
|