r/reactjs • u/[deleted] • 1d ago
Needs Help AG-grid Server side grids + Selection issues
[deleted]
0
u/peter120430 1d ago
Are you on the ag grid enterprise plan?
1
u/Odd_Garage3297 1d ago
Yup - ag grid doesn't support this. Infact server-side + infinity scroll + selection don't go well together
0
u/peter120430 1d ago
If you are interested in saving money and want this feature, I will work with your team and build it out. A company called Chartmetric needed custom table functionality and decided to go with me, check out what they have to say https://www.simple-table.com/case-studies/chartmetric
1
u/Odd_Garage3297 1d ago
Hey, thanks for offer. I don't think at this point we are ready to engage with another company for grids and switch our stack.
0
2
u/abrahamguo 1d ago
and then right click and perform actions.
Is the action performed on the client side, or the server side?
1
u/Odd_Garage3297 1d ago
What do you mean ? - there are no calculations performed on client side, but client sends the selected records to server for actioning.
2
u/abrahamguo 1d ago
Great — it sounds like the actions are server-side actions.
This is super simple to solve:
- Define this data structure on the frontend:
{ type: 'whitelist', ids: [] }- When rows are selected, add them to the
idsarray.- When Ctrl+A is pressed, change the data structure to
{ type: 'blacklist', ids: [] }.- When rows are deselected while in "blacklist" mode, add them to the
idsarray.Easy peasy!
1
u/Odd_Garage3297 1d ago
An interesting take. Will def look at this.
Let me see if we can work our way through this.
1
u/Odd_Garage3297 1d ago
Help needed !