Skip to content

Commit

Permalink
fix: added flex-direction to unremovableProps and check isPropRemovab…
Browse files Browse the repository at this point in the history
…le before removing prop

GitOrigin-RevId: e768743ec2ad297277b32239c5c30ec2d5a90ffa
  • Loading branch information
abbas-nazar authored and actions-user committed Oct 29, 2024
1 parent cfbbbd6 commit 34b96b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const InitialsForm = observer(function InitialsForm(props: {
addItemKey: AddItemKey;
}) {
const { studioCtx, rs, addItemKey } = props;
const expsProvider = new SingleRsExpsProvider(rs, studioCtx, ["display"]);
const expsProvider = new SingleRsExpsProvider(rs, studioCtx, [
"display",
"flex-direction",
]);
return providesStyleComponent(
mkStyleComponent({ expsProvider }),
`${rs.uid}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ function StylePanelSection_(
await studioCtx.changeUnsafe(() => {
const exp = expsProvider.targetExp();
for (const prop of L.without(styleProps, ...unremovableProps)) {
if (exp.has(prop)) {
if (exp.has(prop) && expsProvider.isPropRemovable(prop)) {
exp.clear(prop);
}
}
Expand Down

0 comments on commit 34b96b0

Please sign in to comment.