0

I have an ag grid with several custom components for each column, the component are showing but whenever I filter the data the component disappears, for example: the component inside the row

to filter I use an input with a filtering function:

<data-grid [rowData]="filteredData(searchInput.query)"/>

the data-grid selector contains a regular ag-grid-angular component:

<ag-grid-angular 
    style="width: 100%; height: 350px;"
    class="ag-theme-alpine-dark"
    [rowData]="rowData"
    [columnDefs]="columnDefs" />

after filtering the custom component inside the row disappears: no component

what could be the problem? Thanks in advance

I was expecting for the components inside the rows to appear normally, tried looking for re-rendering in the docs but no luck

1 Answers1

0

My guess is that your filteredData(searchInput.query) method is causing this issue, but I'd need to see at least these two component's typescript files to tell what's going on.

  • [FlagCode Component](https://pastebin.com/iRJe3R6H) used inside the row, [filteredData function](https://pastebin.com/aEyyPybX) – freakinu May 31 '23 at 10:26
  • Thanks for sharing that. Since this is happening after filtering, have you used the debugger and set a breakpoint to watch the data as it's being filtered? That might give you a clue as to what's going on here. – Perry Crain May 31 '23 at 17:45
  • I didn't, I'm re-reading the docs maybe I can find something – freakinu May 31 '23 at 19:15
  • Definitely familiarize yourself with the debugger tool offered through Chrome. It's very powerful. – Perry Crain Jun 01 '23 at 14:41