Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Reset columns on change
Browse files Browse the repository at this point in the history
  • Loading branch information
knicklabs committed Mar 1, 2022
1 parent 8eaea50 commit 08636bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Table/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export function Table({
updateTableData(data, maxRowsToDisplay)
}, [data, maxRowsToDisplay, sortedInfo])

useDeepCompareEffect(() => {
resetColumns(columns)
}, [columns])

function renderHeader() {
if (!headerContent && !withColumnChooser) {
return null
Expand Down

0 comments on commit 08636bd

Please sign in to comment.