Skip to content

Commit

Permalink
fix: 🐛 Updated AG-Grid to use the new api to remove deprecation warni…
Browse files Browse the repository at this point in the history
…ngs (#1043)

* fix: 🐛 Updated AG-Grid to use the new api to remove deprecation warnings

* trigger GitHub actions

* update pnpm action
  • Loading branch information
EdwardBrunton authored Jul 11, 2024
1 parent aadd52c commit b06dccd
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/actions/pnpm-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'Set up pnpm with cache'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4
with:
version: 9.0.5

Expand Down
4 changes: 2 additions & 2 deletions libs/handoverapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const useTableConfig = (
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((s) => s.getColId() !== 'description')
);
Expand Down
4 changes: 2 additions & 2 deletions libs/heattraceapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const useTableConfig = (contextId: string): GridConfig<HeatTrace, FilterS
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((column) => column.getColId() !== 'description')
);
Expand Down
4 changes: 2 additions & 2 deletions libs/mechanicalcompletionapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export const useTableConfig = (contextId: string): GridConfig<McPackage, FilterS
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((s) => s.getColId() !== 'description')
);
Expand Down
4 changes: 2 additions & 2 deletions libs/pipingapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const useTableConfig = (contextId: string): GridConfig<Pipetest, FilterSt
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((column) => column.getColId() !== 'description')
);
Expand Down
4 changes: 2 additions & 2 deletions libs/punchapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export const useTableConfig = (contextId: string): GridConfig<Punch, FilterState
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((s) => s.getColId() !== 'description')
);
Expand Down
4 changes: 2 additions & 2 deletions libs/scopechangerequestapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const useTableConfig = (
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((s) => s.getColId() !== 'description')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const defaultGridOptions: GridOptions = {
enableCellTextSelection: true,
ensureDomOrder: true,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((s) => !excludedColumns.includes(s.getColId().toLocaleLowerCase()))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function useGridDataSource<TData>(
return def;
});

params.api.setColumnDefs(newColDefs);
params.api.updateGridOptions({ columnDefs: newColDefs });
setColDefs(newColDefs);
}

Expand Down
4 changes: 2 additions & 2 deletions libs/swcrapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const useTableConfig = (
gridOptions: {
...defaultGridOptions,
onFirstDataRendered: (e) => {
e.columnApi.autoSizeColumns(
e.columnApi
e.api.autoSizeColumns(
e.api
.getAllDisplayedColumns()
.filter((s) => !['description', 'title'].includes(s.getColId()))
);
Expand Down

0 comments on commit b06dccd

Please sign in to comment.