@dataloop-ai/components 0.20.261-new-input.5 → 0.20.261

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.20.261-new-input.5",
3
+ "version": "0.20.261",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -748,7 +748,7 @@ export default defineComponent({
748
748
  const setHighlightedIndex = (value: any) => {
749
749
  highlightedIndex.value = value
750
750
  }
751
- const handleSelectedItem = (value: unknown) => {
751
+ const handleSelectedItem = (value: string | null | undefined) => {
752
752
  if (typeof value !== 'string') {
753
753
  return
754
754
  }
@@ -1173,10 +1173,7 @@ export default defineComponent({
1173
1173
  return !this.$slots.append && this.type === 'password'
1174
1174
  },
1175
1175
  showSuggestItems(): boolean {
1176
- const hasValue =
1177
- this.modelValue !== null &&
1178
- this.modelValue !== undefined &&
1179
- `${this.modelValue}`.length > 0
1176
+ const hasValue = String(this.modelValue ?? '').length > 0
1180
1177
  return (
1181
1178
  !!this.suggestItems?.length &&
1182
1179
  (hasValue || (this.openSuggestionsOnFocus && this.focused))
@@ -1367,12 +1364,9 @@ export default defineComponent({
1367
1364
  return !!relatedTarget?.closest(`.${this.suggestionMenuClass()}`)
1368
1365
  },
1369
1366
  closeSuggestionMenuAfterBlur(): void {
1370
- // Delay close so suggestion item click can finish before menu teardown.
1371
- setTimeout(() => {
1372
- if (!this.focused) {
1373
- this.isMenuOpen = false
1374
- }
1375
- }, 0)
1367
+ if (!this.focused) {
1368
+ this.isMenuOpen = false
1369
+ }
1376
1370
  },
1377
1371
  onBlur(e: FocusEvent): void {
1378
1372
  if (this.isBlurToSuggestionMenu(e)) {