Topic: Row action dropdown is offset in an RTL table
JustinB
free
asked 1 week ago
Our Arabic layout places action menus far from their buttons inside the data table. The same markup aligns correctly in LTR.
Which positioning settings should I check?
Arkadiusz Idzikowski
staff
answered 1 week ago
That block overrides the coordinates calculated for the trigger. The left: 100% rule is still moving the menu even after you remove the transform. Delete the entire positioning override, including the important declarations, and let the dropdown calculate its placement.
You can keep appearance rules such as the width below. Test again in the RTL table before adding any custom alignment; the menu should now remain attached to its button.
.table-actions .dropdown-menu {
min-width: 11rem;
}
Arkadiusz Idzikowski
staff
answered 1 week ago
First check that the table and dropdown inherit the same RTL direction and that an ancestor is not applying a transform or a manual left/right offset. Compare the trigger and menu bounding rectangles when the menu opens; that will show whether the offset starts at the table wrapper.
Please share a minimal table with one action dropdown, the RTL setup, and the wrapper CSS. Also confirm whether the same dropdown aligns outside the table. Without that example we cannot distinguish a positioning defect from a containing block or stylesheet conflict.
https://mdbootstrap.com/docs/angular/components/dropdowns/
JustinB free commented 1 week ago
The dropdown aligns correctly when I move it outside the table. Both containers inherit dir="rtl". I found these rules in our table stylesheet; they were intended to keep the menu beside the last column. Removing the transform helps, but it is still detached from the button.
.table-actions .dropdown-menu {
left: 100% !important;
right: auto !important;
transform: translateX(16px) !important;
}
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: MDB5 9.0.0
- Device: Desktop
- Browser: Chrome
- OS: Windows 11
- Provided sample code: No
- Provided link: No