From 8bade6ece96f7842b75b6f6e1cceccaae8386a01 Mon Sep 17 00:00:00 2001 From: "nida.ghuman" Date: Sat, 21 Dec 2024 15:59:55 -0500 Subject: [PATCH] fixes for borderon second header level --- .../Components/TableHeaderCell.tsx | 17 +++++++++++------ .../_advanced_table_column_headers_multiple.jsx | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/playbook/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx b/playbook/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx index 3e5f000ebc..32075a3e04 100644 --- a/playbook/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +++ b/playbook/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx @@ -53,13 +53,18 @@ export const TableHeaderCell = ({ header?.column.getLeafColumns().length === 1 && header?.column.getLeafColumns()[0].id === header.column.id -const cellClassName = classnames("table-header-cells", - `${isChrome() ? "chrome-styles" : ""}`, +const cellClassName = classnames( + "table-header-cells", + `${isChrome() ? "chrome-styles" : ""}`, `${enableSorting ? "table-header-cells-active" : ""}`, - { 'pinned-left': responsive === "scroll" && isPinnedLeft }, - `${header?.column.parent?.columns.at(-1) === header?.column ? "last-header-cell" : "" - }`, -) + { "pinned-left": responsive === "scroll" && isPinnedLeft }, + `${ + header?.column.parent?.columns.at(-1) === header?.column || + (header?.colSpan > 1 && header?.column.parent !== undefined) + ? "last-header-cell" + : "" + }` +); const cellId = `${loading ? `loading-${header?.id}` diff --git a/playbook/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx b/playbook/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx index e9110ca1af..da0ebf378d 100644 --- a/playbook/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +++ b/playbook/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx @@ -51,8 +51,8 @@ const AdvancedTableColumnHeadersMultiple = (props) => { label: "Attendance Rate", }, { - accessor: "graduatedStudents", - label: "Graduated Students", + accessor: "scheduledMeetings", + label: "Scheduled Meetings", }, ], },