Skip to content

Commit 78ddbc0

Browse files
fix progressbar sizing
1 parent 1b4f833 commit 78ddbc0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • packages/builder-web-core/widgets-native/html-progress

packages/builder-web-core/widgets-native/html-progress/index.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,26 @@ export class Progress extends Container implements IProgressIndicatorProps {
112112
attributes: attrs,
113113
};
114114
}
115+
116+
get finalStyle() {
117+
const superstyl = super.finalStyle;
118+
119+
// width override. ------------------------------------------------------------------------------------------
120+
// input element's width needs to be specified if the position is absolute and the left & right is specified.
121+
let width = superstyl.width;
122+
if (
123+
width === undefined &&
124+
superstyl.position === "absolute" &&
125+
superstyl.left !== undefined &&
126+
superstyl.right !== undefined
127+
) {
128+
width = "calc(100% - " + superstyl.left + " - " + superstyl.right + ")";
129+
}
130+
// ----------------------------------------------------------------------------------------------------------
131+
132+
return {
133+
...superstyl,
134+
width,
135+
};
136+
}
115137
}

0 commit comments

Comments
 (0)