fix(ui,richtext-*): path from context should always have precedence over path from props, even if it's an empty string (#6782)

This commit is contained in:
Alessio Gravili
2024-06-15 01:42:16 -04:00
committed by GitHub
parent 628749573e
commit e7159c033e
29 changed files with 163 additions and 44 deletions

View File

@@ -106,7 +106,7 @@ const RichTextField: React.FC<
const { formInitializing, initialValue, path, schemaPath, setValue, showError, value } = useField(
{
path: pathFromContext || pathFromProps || name,
path: pathFromContext ?? pathFromProps ?? name,
validate: memoizedValidate,
},
)