@dataloop-ai/components 0.19.98 → 0.19.100

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.19.98",
3
+ "version": "0.19.100",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -73,7 +73,6 @@
73
73
  </div>
74
74
  <textarea
75
75
  ref="textarea"
76
- title="textarea"
77
76
  :readOnly="readOnly"
78
77
  :style="textAreaStyle"
79
78
  :autofocus="autofocus"
@@ -245,9 +245,16 @@
245
245
  :opt="item"
246
246
  >
247
247
  <span
248
+ v-if="fitContent"
248
249
  class="inner-option"
249
250
  v-html="getOptionHtml(item)"
250
251
  />
252
+ <dl-ellipsis v-else>
253
+ <span
254
+ class="inner-option"
255
+ v-html="getOptionHtml(item)"
256
+ />
257
+ </dl-ellipsis>
251
258
  </slot>
252
259
  </dl-select-option>
253
260
  </dl-virtual-scroll>
@@ -851,15 +858,20 @@ export default defineComponent({
851
858
  },
852
859
  getOptionHtml(option: DlSelectOptionType) {
853
860
  const label = `${this.getOptionLabel(option)}`
854
- const toReplace = new RegExp(this.searchInputValue, 'gi')
855
-
856
- const highlightedHtml = label.replace(
857
- toReplace,
858
- `<span style="background: var(--dl-color-warning)">${getCaseInsensitiveInput(
859
- label,
860
- this.searchInputValue
861
- )}</span>`
862
- )
861
+ let highlightedHtml = label
862
+
863
+ if (this.searchInputValue?.length) {
864
+ const toReplace = new RegExp(this.searchInputValue, 'gi')
865
+
866
+ highlightedHtml = label.replace(
867
+ toReplace,
868
+ `<span style="background: var(--dl-color-warning)">${getCaseInsensitiveInput(
869
+ label,
870
+ this.searchInputValue
871
+ )}</span>`
872
+ )
873
+ }
874
+
863
875
  const html = `<span>${highlightedHtml}</span>`
864
876
 
865
877
  return html