Enrich button actions nested inside conditions

This commit is contained in:
Andrew Kingston 2021-07-23 15:44:16 +01:00
parent a00473fa61
commit b02f631888
1 changed files with 12 additions and 0 deletions

View File

@ -43,5 +43,17 @@ export const enrichProps = (props, context) => {
)
}
// Enrich any click actions in conditions
if (enrichedProps._conditions) {
enrichedProps._conditions.forEach(condition => {
if (condition.setting === "onClick") {
condition.settingValue = enrichButtonActions(
condition.settingValue,
totalContext
)
}
})
}
return enrichedProps
}