Skip to content

Commit 69021de

Browse files
authored
Merge pull request #424 from Dyalog/background-subform-fix
Zilde explicitly clears all BCol setting
2 parents 9ce18c9 + ea674c9 commit 69021de

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/SubForm/index.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ const SubForm = ({ data }) => {
108108
const inheritedSize = inheritedProperty(data, "Size", ["Form", "SubForm"]);
109109
const inheritedBCol = inheritedProperty(data, "BCol", ["Form", "SubForm"]);
110110

111+
// Zilde is no background, otherwise inherited, otherwise default
112+
let background;
113+
if (Array.isArray(inheritedBCol) && inheritedBCol.length === 0) {
114+
background = undefined;
115+
} else {
116+
background = rgbColor(inheritedBCol) || "#F0F0F0"
117+
}
118+
111119
return (
112120
<div
113121
id={data.ID}
@@ -118,7 +126,7 @@ const SubForm = ({ data }) => {
118126
: data?.Properties.hasOwnProperty("Flex")
119127
? "flex"
120128
: "block",
121-
background: rgbColor(inheritedBCol) || "#F0F0F0",
129+
background: background,
122130
// Must have a z-index, this is important
123131
zIndex: data.Properties?.ZIndex || 0,
124132
...updatedStyles,

vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default defineConfig({
66
plugins: [react()],
77
build: {
88
// minify: false,
9+
target: 'es2022',
910
rollupOptions: {
1011
output: {
1112
manualChunks: () => 'index',

0 commit comments

Comments
 (0)