Skip to content

Commit

Permalink
fix(plugin-chart-table): hide column configs when no columns (#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud authored and zhaoyongjie committed Nov 26, 2021
1 parent c86ffd2 commit 679b82b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function ColumnConfigControl<T extends ColumnConfig>({
}
};

if (!colnames) return null;
if (!colnames || colnames.length === 0) return null;

const needShowMoreButton = colnames.length > MAX_NUM_COLS + 2;
const cols = needShowMoreButton && !showAllColumns ? colnames.slice(0, MAX_NUM_COLS) : colnames;
Expand Down

0 comments on commit 679b82b

Please sign in to comment.