Clear validation processing when crossing into a side panel component
This commit is contained in:
parent
fe669b7e54
commit
cd43a1a2c2
|
@ -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) {
|
||||
|
|
|
@ -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}`
|
||||
|
|
Loading…
Reference in New Issue