Skip to content

Commit 624f00b

Browse files
authored
Ensure element visibility works with form data. (baserow#4391)
* For element visibility to work with form data, the applicationContext must contain the element. At the moment it's missing, so when we resolve the formula, it's always null. * Implementing Jrmi's suggestion https://github.com/baserow/baserow/pull/4391/files#r2588874445.
1 parent 6d81aaa commit 624f00b

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "bug",
3+
"message": "Resolved a bug in element visibility which prevented form data from being used.",
4+
"issue_origin": "github",
5+
"issue_number": null,
6+
"domain": "builder",
7+
"bullet_points": [],
8+
"created_at": "2025-12-04"
9+
}

web-frontend/modules/builder/components/elements/ElementPreview.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ export default {
111111
getClosestSiblingElement: 'element/getClosestSiblingElement',
112112
loggedUser: 'userSourceUser/getUser',
113113
}),
114+
applicationContext() {
115+
return {
116+
...this.injectedApplicationContext,
117+
...this.applicationContextAdditions,
118+
element: this.element,
119+
}
120+
},
114121
pageTop() {
115122
return this.pageTopData.value
116123
},

web-frontend/modules/builder/components/page/PageElement.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ export default {
6464
BACKGROUND_TYPES: () => BACKGROUND_TYPES,
6565
CHILD_WIDTH_TYPES: () => CHILD_WIDTH_TYPES,
6666
WIDTH_TYPES: () => WIDTH_TYPES,
67+
applicationContext() {
68+
return {
69+
...this.injectedApplicationContext,
70+
...this.applicationContextAdditions,
71+
element: this.element,
72+
}
73+
},
6774
themeConfigBlocks() {
6875
return this.$registry.getOrderedList('themeConfigBlock')
6976
},

0 commit comments

Comments
 (0)