@dataloop-ai/components 0.19.280 → 0.19.281

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.280",
3
+ "version": "0.19.281",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -272,12 +272,24 @@ export const useSuggestions = (
272
272
  if (isObject(fieldOf) && !Array.isArray(fieldOf)) {
273
273
  for (const key of Object.keys(fieldOf)) {
274
274
  if (key === '*') continue
275
+ if (aliasedKeys.includes(`${matchedField}.${key}`))
276
+ continue
275
277
  toAdd.push(`.${key}`)
276
278
  }
277
279
  }
278
280
  } else {
281
+ const matchedFieldBeforeDot = matchedField.replace(
282
+ new RegExp(`\\.${lastWord}$`),
283
+ ''
284
+ )
279
285
  for (const key in fieldOf) {
280
286
  if (key === '*') continue
287
+ if (
288
+ aliasedKeys.includes(
289
+ `${matchedFieldBeforeDot}.${key}`
290
+ )
291
+ )
292
+ continue
281
293
  if (key.startsWith(lastWord)) {
282
294
  toAdd.push(`.${key}`)
283
295
  }