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 = []
|
legalDirectChildren = []
|
||||||
) => {
|
) => {
|
||||||
const type = component._component
|
const type = component._component
|
||||||
|
|
||||||
if (illegalChildren.includes(type)) {
|
if (illegalChildren.includes(type)) {
|
||||||
return type
|
return type
|
||||||
}
|
}
|
||||||
|
@ -248,10 +249,13 @@ export const getFrontendStore = () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type === "@budibase/standard-components/sidepanel") {
|
||||||
|
illegalChildren = []
|
||||||
|
}
|
||||||
|
|
||||||
const definition = store.actions.components.getDefinition(
|
const definition = store.actions.components.getDefinition(
|
||||||
component._component
|
component._component
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reset whitelist for direct children
|
// Reset whitelist for direct children
|
||||||
legalDirectChildren = []
|
legalDirectChildren = []
|
||||||
if (definition?.legalDirectChildren?.length) {
|
if (definition?.legalDirectChildren?.length) {
|
||||||
|
|
|
@ -52,6 +52,9 @@
|
||||||
// Build up list of illegal children from ancestors
|
// Build up list of illegal children from ancestors
|
||||||
let illegalChildren = definition.illegalChildren || []
|
let illegalChildren = definition.illegalChildren || []
|
||||||
path.forEach(ancestor => {
|
path.forEach(ancestor => {
|
||||||
|
if (ancestor._component === `@budibase/standard-components/sidepanel`) {
|
||||||
|
illegalChildren = []
|
||||||
|
}
|
||||||
const def = store.actions.components.getDefinition(ancestor._component)
|
const def = store.actions.components.getDefinition(ancestor._component)
|
||||||
const blacklist = def?.illegalChildren?.map(x => {
|
const blacklist = def?.illegalChildren?.map(x => {
|
||||||
return `@budibase/standard-components/${x}`
|
return `@budibase/standard-components/${x}`
|
||||||
|
|
Loading…
Reference in New Issue