Skip to content

Commit

Permalink
fix: colspan was not proper for single select empty table
Browse files Browse the repository at this point in the history
  • Loading branch information
aqibibm committed Feb 20, 2024
1 parent 46a619d commit 4224a58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react/src/components/Table/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ const Table = (props) => {
const { maxPages, ...paginationProps } = view.pagination;
const langDir = useLangDirection();
const hasMultiSelect = options.hasRowSelection === 'multi';
const hasSingleSelect = options.hasRowSelection === 'single';

const [tableId] = useState(() => uniqueId('table-'));
const [, forceUpdateCellTextWidth] = useState(0);
Expand Down Expand Up @@ -843,11 +844,12 @@ const Table = (props) => {
const totalColumns =
visibleColumns.length +
(hasMultiSelect ? 1 : 0) +
(hasSingleSelect ? 1 : 0) +
(options.hasRowExpansion || options.hasRowNesting ? 1 : 0) +
(options.hasRowActions ? 1 : 0) +
(showExpanderColumn ? 1 : 0) +
(options.hasDragAndDrop ? 1 : 0);

console.log('totalColumns', totalColumns);
const isFiltered =
view.filters.length > 0 ||
view.selectedAdvancedFilterIds.length ||
Expand Down

0 comments on commit 4224a58

Please sign in to comment.