@dataloop-ai/components 0.19.192 → 0.19.193

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.192",
3
+ "version": "0.19.193",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -22,7 +22,7 @@
22
22
  "check-only": "if grep -E -H -r --exclude-dir=.git --exclude-dir=node_modules --exclude=*.json --exclude=*.yml '^(describe|it).only' .; then echo 'Found only in test files' && exit 1; fi"
23
23
  },
24
24
  "dependencies": {
25
- "@dataloop-ai/icons": "^3.0.33",
25
+ "@dataloop-ai/icons": "^3.0.35",
26
26
  "@types/flat": "^5.0.2",
27
27
  "@types/lodash": "^4.14.184",
28
28
  "@types/sortablejs": "^1.15.7",
@@ -40,6 +40,7 @@ import { v4 } from 'uuid'
40
40
  import {
41
41
  computed,
42
42
  defineComponent,
43
+ onMounted,
43
44
  onUnmounted,
44
45
  ref,
45
46
  toRefs,
@@ -152,14 +153,6 @@ export default defineComponent({
152
153
  return { display: inline.value ? 'inline-flex' : 'flex' }
153
154
  })
154
155
 
155
- watch(icon, () => {
156
- const possibleToLoadSvg =
157
- isSVG.value && icon.value && icon.value !== ''
158
- if (possibleToLoadSvg) {
159
- loadSvg()
160
- }
161
- })
162
-
163
156
  const loadSvg = () => {
164
157
  return new Promise<void>((resolve, reject) => {
165
158
  const svgElement = new Image()
@@ -192,6 +185,18 @@ export default defineComponent({
192
185
  })
193
186
  }
194
187
 
188
+ watch(
189
+ icon,
190
+ () => {
191
+ const possibleToLoadSvg =
192
+ isSVG.value && icon.value && icon.value !== ''
193
+ if (possibleToLoadSvg) {
194
+ loadSvg()
195
+ }
196
+ },
197
+ { immediate: true }
198
+ )
199
+
195
200
  onUnmounted(() => {
196
201
  isDestroyed.value = true
197
202
  })