@dataloop-ai/components 0.19.107 → 0.19.108
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 +1 -1
- package/src/hooks/use-suggestions.ts +11 -8
package/package.json
CHANGED
|
@@ -363,7 +363,9 @@ const getError = (
|
|
|
363
363
|
for (const key of Object.keys(schema)) {
|
|
364
364
|
if (isObject(schema[key]) && !Array.isArray(schema[key])) {
|
|
365
365
|
const flattened = flatten({ [key]: schema[key] })
|
|
366
|
-
|
|
366
|
+
for (const k of Object.keys(flattened)) {
|
|
367
|
+
keys.push(k)
|
|
368
|
+
}
|
|
367
369
|
} else {
|
|
368
370
|
keys.push(key)
|
|
369
371
|
}
|
|
@@ -689,13 +691,14 @@ const getValueSuggestions = (
|
|
|
689
691
|
const suggestion: string[] = []
|
|
690
692
|
|
|
691
693
|
if (Array.isArray(dataType)) {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
(type)
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
694
|
+
for (const type of dataType) {
|
|
695
|
+
if (
|
|
696
|
+
!knownDataTypes.includes(type as string) &&
|
|
697
|
+
typeof type !== 'object'
|
|
698
|
+
) {
|
|
699
|
+
suggestion.push(type)
|
|
700
|
+
}
|
|
701
|
+
}
|
|
699
702
|
}
|
|
700
703
|
|
|
701
704
|
for (const type of types) {
|