0
votes

see example codesandbox:

Slow when using custom headers (by 14 seconds)

https://codesandbox.io/s/ag-grid-react-getfilterinstance-slow-with-custom-headers-welt9?file=/src/Grid/Grid.tsx

steps:

  1. (Click) toggle to display filters
  2. (Type) Toyota
  3. wait filter update (also slow)
  4. (click) getFilter
  5. WAIT 10 seconds or more for the console.log to display...

This example uses custom headers but adding agColumnHeader to frameworkComponents

const frameworkComponents = {
  agColumnHeader: AgColumnHeader
};

Also on button click - toggles the filters to be true

colDef.floatingFilter = !colDef.floatingFilter;
colDef.filter = "agTextColumnFilter";

Faster when NOT using custom headers

https://codesandbox.io/s/ag-grid-react-getfilterinstance-fast-forked-sfd3x?file=/src/Grid/Grid.tsx:957-1523

steps:

  1. (Click) Filter icon
  2. (Type) Toyota
  3. wait filter update (also slow)
  4. (click) getFilter
  5. WAIT 10 seconds or more for the console.log to display...

This example simply defaults the floatingFilter to true on load but does not have customisation on column headers.

 const defaultColDef: TColumn = {
    filter: "agTextColumnFilter",
    floatingFilter: true
  };
1

1 Answers

0
votes

so it turns out its codesandbox - ridiculously slow. I tested this in my local environment and its fast. What a let down.