Skip to content

Commit 7fb1b66

Browse files
committed
Adjucted quick action buttons placement
1 parent 2212dcb commit 7fb1b66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bundle/Resources/public/js/scripts/quick.action.manager.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
return false;
2626
});
2727

28+
const maxExtraPadding = Math.max(...buttonsToRender.map((config) => config.extraBottomPadding || 2));
29+
2830
buttonsToRender.forEach((buttonConfig, index) => {
2931
const { container } = buttonConfig;
3032

@@ -36,7 +38,7 @@
3638
container.style.right = '2rem';
3739
container.style.zIndex = buttonConfig.zIndex || 1040;
3840

39-
const bottomPosition = `${index * ACTION_BTN_VERTICAL_SPACING + 2}rem`;
41+
const bottomPosition = `${index * ACTION_BTN_VERTICAL_SPACING + maxExtraPadding}rem`;
4042

4143
container.style.bottom = bottomPosition;
4244
});

0 commit comments

Comments
 (0)