mirror of
https://github.com/docmost/docmost.git
synced 2026-09-01 03:15:32 +08:00
fix(base): pull AddRowButton out of grid so sticky-left actually sticks
As a child of .grid with grid-column: 1/-1, the button took the full row width and the sticky-left offset got swallowed by the grid layout — it scrolled along with the cells instead of anchoring to the left. Move it to a sibling of .grid inside .gridWrapper, restyle as a small inline-flex chip with width: max-content. Sticky-left now keeps it pinned to page-content-left while the user scrolls horizontally, matching the toolbar. Add padding-bottom: 6px on .gridWrapper and a small vertical margin on the button so the horizontal scrollbar no longer overlaps it.
This commit is contained in:
@@ -296,10 +296,9 @@ export function GridContainer({
|
||||
{paddingBottom > 0 && (
|
||||
<div style={{ height: paddingBottom, gridColumn: "1 / -1" }} />
|
||||
)}
|
||||
|
||||
<AddRowButton onClick={handleAddRow} />
|
||||
{pageId && <SelectionActionBar pageId={pageId} />}
|
||||
</div>
|
||||
<AddRowButton onClick={handleAddRow} />
|
||||
{pageId && <SelectionActionBar pageId={pageId} />}
|
||||
</div>
|
||||
</DndContext>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user