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

fix(DataTable): apply bottom border width in dataTable footer #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KumJungMin
Copy link

@KumJungMin KumJungMin commented Sep 1, 2024

Defect Fixes

How to Resolve

  • Previously, the td styles at the top of the footer were adjusted based on whether the footer was present.
  • However, when the length of the footer's columns was shorter than the total number of columns, some td elements did not receive the correct border styles.
  • To resolve this, I removed the code that modified the td styles based on the presence of the footer:
// .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td {
//     border-width: 0 0 0 1px;
// }
// .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {
//     border-width: 0 1px 0 1px;
// }

  • Now, instead of changing styles based on the footer's presence, I apply a consistent border-width to all td elements.
  • When the footer is present, I specifically set the border styles for the td elements in the footer:
.landing-themes .p-datatable.p-datatable-gridlines .p-datatable-tfoot > tr > td {
  // border-width: 1px 0 1px 1px;
  border-width: 0 0 1px 1px;  // updated
}
.landing-themes .p-datatable.p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {
  // border-width: 1px 1px 1px 1px; 
  border-width: 0 1px 1px 1px;  // updated
}

@KumJungMin KumJungMin marked this pull request as ready for review September 1, 2024 12:37
@@ -520,7 +520,7 @@ $tableFooterCellPadding: 1rem 1rem !default;
$tableFooterCellBg: #1e1e1e !default;
$tableFooterCellTextColor: $textColor !default;
$tableFooterCellFontWeight: 500 !default;
$tableFooterCellBorder: 1px solid 3404040 !default;
$tableFooterCellBorder: 1px solid #404040 !default;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • i change color to hex :)

@KumJungMin KumJungMin changed the title fix(#7080): apply bottom border width in dataTable footer fix(DataTable): apply bottom border width in dataTable footer Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant