Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Loading Cell Renderer - ClientSideRowModule #7939

Closed
gxferreira opened this issue May 9, 2024 · 2 comments
Closed

Custom Loading Cell Renderer - ClientSideRowModule #7939

gxferreira opened this issue May 9, 2024 · 2 comments

Comments

@gxferreira
Copy link

I'm submitting a ...

[x] bug report => see 'Providing a Reproducible Scenario'
[] feature request => do not use Github for feature requests, see 'Customers of AG Grid'
[] support request => see 'Requesting Community Support'

Current behavior
I use AG Grid in a React project with a client-side row model.

I tried to customize the loader using the gridOptions.loadingCellRenderer, following this code: https://www.ag-grid.com/react-data-grid/component-loading-cell-renderer/#full-width-loading-row.
However, this setting does not work when using the Client-Side Row Model.

Expected behavior
The custom loading cell renderer should work with the Client-Side Row Model.

Reproducible Scenario
This problem can be seen in this plunker.

I just got the example linked above and:

  • changed the Grid to use the Client-Side Row Model:
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
ModuleRegistry.registerModules([ClientSideRowModelModule]);
  • removed all code related to the server-side data source;
  • Changed the rowData to undefined to enable the loading overlay:
<AgGridReact<IOlympicData>
    columnDefs={columnDefs}
    defaultColDef={defaultColDef}
    loadingCellRenderer={loadingCellRenderer}
    loadingCellRendererParams={loadingCellRendererParams}
    cacheBlockSize={20}
    maxBlocksInCache={10}
    rowData={undefined} // <--- HERE
  />
@sabahang
Copy link

sabahang commented May 17, 2024

Hi @gxferreira

Thanks for reporting this.

I've modified your example to add loadingCellRenderer . However please be mindful that as per docs loadingCellRenderer is a SSRM feature only and is not intended to be used with CSRM

@gxferreira
Copy link
Author

Sorry, I didn't notice that the loadingCellRenderer was enabled only for SSRM.
Now that you've mentioned it, I noticed the page under the SSRM menu item.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants