Skip to content
Open
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 @@ -376,6 +376,7 @@ export const TableCompView = React.memo((props: {
$isVirtual={scrollConfig.virtual}
$showHorizontalScrollbar={showHorizontalScrollbar}
$showVerticalScrollbar={showVerticalScrollbar}
$tableSize={size as 'small' | 'middle' | 'large'}
>
<ResizeableTable<RecordType>
expandable={{
Expand Down
19 changes: 19 additions & 0 deletions client/packages/lowcoder/src/comps/comps/tableComp/tableStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const TableWrapper = styled.div.attrs<{
$isVirtual?: boolean;
$showHorizontalScrollbar?: boolean;
$showVerticalScrollbar?: boolean;
$tableSize?: "small" | "middle" | "large";
}>`
.ant-table-wrapper {
border-top: unset;
Expand Down Expand Up @@ -207,6 +208,7 @@ export const TableWrapper = styled.div.attrs<{
border-color: ${(props) => props.$headerStyle.border};
border-width: ${(props) => props.$headerStyle.borderWidth};
color: ${(props) => props.$headerStyle.headerText};
padding: 0 !important; /* Override Ant Design's default padding */
// border-inline-end: ${(props) => `${props.$headerStyle.borderWidth} solid ${props.$headerStyle.border}`} !important;

/* Proper styling for fixed header cells */
Expand All @@ -223,6 +225,9 @@ export const TableWrapper = styled.div.attrs<{

> div {
margin: ${(props) => props.$headerStyle.margin};
/* Default padding for middle size (Ant Design default) */
padding: 8px 8px;
min-height: 24px;

&, .ant-table-column-title > div {
font-size: ${(props) => props.$headerStyle.textSize};
Expand All @@ -231,6 +236,20 @@ export const TableWrapper = styled.div.attrs<{
font-style: ${(props) => props.$headerStyle.fontStyle};
color:${(props) => props.$headerStyle.headerText}
}

/* Adjust header size based on table size */
${(props) => props.$tableSize === 'small' && `
padding: 1px 8px;
min-height: 14px;
`}
${(props) => props.$tableSize === 'middle' && `
padding: 8px 8px;
min-height: 24px;
`}
${(props) => props.$tableSize === 'large' && `
padding: 16px 16px;
min-height: 48px;
`}
}

&:last-child {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,6 @@ export const TableToolbarStyle = [

export const TableHeaderStyle = [
MARGIN,
PADDING,
FONT_FAMILY,
FONT_STYLE,
TEXT,
Expand Down
Loading