Skip to content
Discussion options

You must be logged in to vote

I'm running into the same issue. Here's a fix, though it isn't very elegant. This determines whether any of the columns actually have a footer. If not, you can return early from the component.

const footers = table
    .getFooterGroups()
    .map((group) => group.headers.map((header) => header.column.columnDef.footer))
    .flat()
    .filter(Boolean);

if (footers.length === 0) return;

// Render footer as normal

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@rajagopalstalwart
Comment options

Comment options

You must be logged in to vote
3 replies
@BrendanC23
Comment options

Answer selected by bastiengrignon
@farhan-hafizh
Comment options

@BrendanC23
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants