Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Fix]: table header on different table sizes#2071

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
iamfaran wants to merge2 commits intolowcoder-org:dev
base:dev
Choose a base branch
Loading
fromiamfaran:fix/table-header
Open
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -378,6 +378,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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -136,6 +136,7 @@ export const TableWrapper = styled.div.attrs<{
$isVirtual?: boolean;
$showHorizontalScrollbar?: boolean;
$showVerticalScrollbar?: boolean;
$tableSize?: "small" | "middle" | "large";
}>`
.ant-table-wrapper {
border-top: unset;
Expand DownExpand Up@@ -202,6 +203,8 @@ 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;
${(props) => props.$showRowGridBorder
? `border-inline-end: ${props.$headerStyle.borderWidth} solid ${props.$headerStyle.border} !important;`
: `border-inline-end: none !important;`
Expand All@@ -221,6 +224,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@@ -229,6 +235,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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1828,7 +1828,6 @@ export const TableToolbarStyle = [

export const TableHeaderStyle = [
MARGIN,
PADDING,
FONT_FAMILY,
FONT_STYLE,
// getStaticBackground(SURFACE_COLOR),
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp