Skip to content

Commit

Permalink
Remove column autosizing
Browse files Browse the repository at this point in the history
Autosizing might be causing issues like #31. The default sizing seems
ok to me, so let's give that a try.
  • Loading branch information
ackerleytng committed Apr 1, 2024
1 parent 1780756 commit 8a9bae9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ const retrieveAndApplySettings = (event: AgGridEvent) => {

const onFirstDataRendered = (event: AgGridEvent) => {
retrieveAndApplySettings(event);

event.api.autoSizeAllColumns(true);
};

const onSortOrFilterChange = ({ api }: AgGridEvent) => {
Expand Down Expand Up @@ -197,9 +195,6 @@ const Grid = forwardRef<GridHandle, GridProps>(({ data }, ref) => {

gridApi.applyColumnState(resetColumnStateParams);
gridApi.setFilterModel(null);

// Delay this so that the column state and filters can reset before autosizing
setTimeout(() => { gridApi.autoSizeAllColumns(true); }, 100);
},
}));

Expand Down

0 comments on commit 8a9bae9

Please sign in to comment.