Clear validation processing when crossing into a side panel component

This commit is contained in:
Dean 2023-06-30 09:48:07 +01:00
parent fe669b7e54
commit cd43a1a2c2
2 changed files with 8 additions and 1 deletions

View File

@ -235,6 +235,7 @@ export const getFrontendStore = () => {
legalDirectChildren = []
) => {
const type = component._component
if (illegalChildren.includes(type)) {
return type
}
@ -248,10 +249,13 @@ export const getFrontendStore = () => {
return
}
if (type === "@budibase/standard-components/sidepanel") {
illegalChildren = []
}
const definition = store.actions.components.getDefinition(
component._component
)
// Reset whitelist for direct children
legalDirectChildren = []
if (definition?.legalDirectChildren?.length) {

View File

@ -52,6 +52,9 @@
// Build up list of illegal children from ancestors
let illegalChildren = definition.illegalChildren || []
path.forEach(ancestor => {
if (ancestor._component === `@budibase/standard-components/sidepanel`) {
illegalChildren = []
}
const def = store.actions.components.getDefinition(ancestor._component)
const blacklist = def?.illegalChildren?.map(x => {
return `@budibase/standard-components/${x}`