@dataloop-ai/components 0.18.89 → 0.18.91

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.18.89",
3
+ "version": "0.18.91",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -15,6 +15,7 @@
15
15
  width="min-content"
16
16
  align-right
17
17
  disable-dropdown-icon-padding
18
+ fit-content
18
19
  without-borders
19
20
  :model-value="modelValue"
20
21
  @update:model-value="setSelectedItem"
@@ -121,8 +121,12 @@ export function setCaret(target: HTMLElement) {
121
121
  }
122
122
 
123
123
  export function clearPartlyTypedSuggestion(oldValue: string, newValue: string) {
124
- const oldSuggestion = oldValue.split(' ').at(-1)
125
- const newSuggestion = newValue.split(' ').at(-2)
124
+ const oldSuggestions = oldValue.split(' ')
125
+ const newSuggestions = newValue.split(' ')
126
+
127
+ const oldSuggestion = oldSuggestions[oldSuggestions.length - 1]
128
+ const newSuggestion = newSuggestions[newSuggestions.length - 2]
129
+
126
130
  if (oldSuggestion && newSuggestion?.includes(oldSuggestion)) {
127
131
  newValue = removeOldSuggestion(newValue)
128
132
  }