Skip to content

Commit

Permalink
fix(TextBox): ensure styles (like textStyles) as passed from TextBox …
Browse files Browse the repository at this point in the history
…to InlineContent when appropriate
  • Loading branch information
erautenberg committed Nov 27, 2023
1 parent 9297903 commit 416ba5f
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,21 @@ export default class TextBox extends Base {
_updateInlineContent() {
this.patch({ Text: undefined });

const inlineContentPatch = InlineContent.properties.reduce((acc, prop) => {
if (this[prop] != undefined) {
acc[prop] = this[prop];
const inlineContentPatch = InlineContent.properties.reduce(
(acc, prop) => {
if (this[prop] != undefined) {
acc[prop] = this[prop];
}
return acc;
},
// ensure all styles are passed down as well
{
style: {
...this.style,
textStyle: this._textStyleSet
}
}
return acc;
}, {});
);

if (this._textStyleSet.wordWrapWidth) {
inlineContentPatch.w = this._textStyleSet.wordWrapWidth;
Expand Down

0 comments on commit 416ba5f

Please sign in to comment.