Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Table summary row + Inline add new row #1114

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

Merged
merged 10 commits into from
Aug 27, 2024
Prev Previous commit
Next Next commit
handle summary rows when expandable is enabled
  • Loading branch information
raheeliftikhar5 committed Aug 27, 2024
commit 52e9166bdb971ef19be8302068fff24fb08cc4be
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ export function TableCompView(props: {
return (
<TableSummary
tableSize={size}
expandableRows={Boolean(expansion.expandModalView)}
summaryRows={parseInt(summaryRows)}
columns={columns}
summaryRowStyle={summaryRowStyle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function TableSummaryCellView(props: {

export function TableSummary(props: {
tableSize: string;
expandableRows: boolean;
summaryRows: number;
columns: ColumnComp[];
summaryRowStyle: TableSummaryRowStyleType;
Expand All @@ -173,8 +174,12 @@ export function TableSummary(props: {
summaryRows,
summaryRowStyle,
tableSize,
expandableRows,
} = props;
const visibleColumns = columns.filter(col => !col.getView().hide);
let visibleColumns = columns.filter(col => !col.getView().hide);
if (expandableRows) {
visibleColumns.unshift(new ColumnComp({}));
}

if (!visibleColumns.length) return <></>;

Expand All @@ -184,7 +189,6 @@ export function TableSummary(props: {
<TableSummaryRow key={rowIndex}>
{visibleColumns.map((column, index) => {
const summaryColumn = column.children.summaryColumns.getView()[rowIndex].getView();
console.log(summaryColumn.cellTooltip)
return (
<TableSummaryCellView
index={index}
Expand Down