|
@@ -282,7 +282,12 @@ export function NodeConfigModal({
|
|
|
const shouldShowField = (prop: any) => {
|
|
const shouldShowField = (prop: any) => {
|
|
|
if (!prop.showWhen) return true
|
|
if (!prop.showWhen) return true
|
|
|
const { field, value } = prop.showWhen
|
|
const { field, value } = prop.showWhen
|
|
|
- return editingConfig[field] === value
|
|
|
|
|
|
|
+ const currentValue = editingConfig[field]
|
|
|
|
|
+ // Support both single value and array of values
|
|
|
|
|
+ if (Array.isArray(value)) {
|
|
|
|
|
+ return value.includes(currentValue)
|
|
|
|
|
+ }
|
|
|
|
|
+ return currentValue === value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return Object.entries(properties).map(([key, prop]: [string, any]) => {
|
|
return Object.entries(properties).map(([key, prop]: [string, any]) => {
|