Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modus Table: Fixed uneven width on rowSelection and rowAction columns #2014

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ table {
font-family: $primary-font;
font-size: $rem-14px;
height: fit-content;
table-layout: fixed;
coliff marked this conversation as resolved.
Show resolved Hide resolved
width: 100%;

&.cell-borderless {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const ModusTableHeader: FunctionalComponent<ModusTableHeaderProps> = ({

const tableHeadClass = { 'show-resize-cursor': getColumnResizing(), 'show-column-reorder-cursor': columnReorder };
const headerGroups: HeaderGroup<unknown>[] = getHeaderGroups();
const rowActionsLength = Math.min(Math.max(rowActions.length * 40, 90), 160);
// const rowActionsLength = Math.min(Math.max(rowActions.length * 40, 90), 160);

return (
<thead class={tableHeadClass}>
Expand All @@ -56,7 +56,7 @@ export const ModusTableHeader: FunctionalComponent<ModusTableHeaderProps> = ({
/>
);
})}
{rowActions.length > 0 && <th class="sticky-right" style={{ width: `${rowActionsLength}px` }}></th>}
{rowActions.length > 0 && <th class="sticky-right" style={{ width:'30px'}}></th>}
</tr>
))}
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const ModusTableHeaderCheckbox: FunctionalComponent<ModusTableHeaderCheck
rowSelectionOptions,
} = context;
return (
<th class="row-checkbox sticky-left">
<th class="row-checkbox sticky-left" style={{width:'30px'}}>
{rowSelectionOptions?.multiple && (
<modus-checkbox
ariaLabel="Select all rows"
Expand Down
Loading