@dataloop-ai/components 0.17.62 → 0.17.63-rogue-hf1.0

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.17.62",
3
+ "version": "0.17.63-rogue-hf1.0",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -19,7 +19,7 @@
19
19
  </template>
20
20
 
21
21
  <script lang="ts">
22
- import { defineComponent, ref, computed } from 'vue-demi'
22
+ import { defineComponent, ref, computed, toRef } from 'vue-demi'
23
23
  import DlTooltip from '../../essential/DlTooltip/DlTooltip.vue'
24
24
  import { useSizeObserver } from '../../../hooks/use-size-observer'
25
25
 
@@ -63,8 +63,8 @@ export default defineComponent({
63
63
  }
64
64
  },
65
65
  setup(props) {
66
- const { text, split } = props
67
-
66
+ const { split } = props
67
+ const textRef = toRef(props, 'text')
68
68
  const splitPositionsRef = computed(() => {
69
69
  return Math.min(
70
70
  Math.max(props.splitPosition, 1),
@@ -75,15 +75,17 @@ export default defineComponent({
75
75
  const dlEllipsisRef = ref(null)
76
76
  const splitIndex = computed(() =>
77
77
  split
78
- ? Math.round(text.length * splitPositionsRef.value)
79
- : text.length
78
+ ? Math.round(textRef.value.length * splitPositionsRef.value)
79
+ : textRef.value.length
80
80
  )
81
81
 
82
- const leftText = computed(() => text.slice(0, splitIndex.value))
83
- const rightText = computed(() => text.slice(splitIndex.value))
82
+ const leftText = computed(() =>
83
+ textRef.value.slice(0, splitIndex.value)
84
+ )
85
+ const rightText = computed(() => textRef.value.slice(splitIndex.value))
84
86
 
85
87
  const { hasEllipsis } = useSizeObserver(dlEllipsisRef)
86
- const fullText = computed(() => text)
88
+ const fullText = computed(() => textRef.value)
87
89
 
88
90
  return {
89
91
  leftText,