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

feature: AgGrid Deselecting Row #3757

Closed
d10sfan opened this issue May 17, 2024 · 0 comments · Fixed by #3760
Closed

feature: AgGrid Deselecting Row #3757

d10sfan opened this issue May 17, 2024 · 0 comments · Fixed by #3760
Assignees

Comments

@d10sfan
Copy link
Contributor

d10sfan commented May 17, 2024

Can you use setSelectedIndex to un-selected a row on an aggrid?

I tried using the ag grid API to run setSelected(false) on a rowNode, but that did not update the state of the ag grid, so selectedRow was still set to something, even though visually it was no longer selected.

Also I tried setSelectedIndex('your-table-id', -1); like the AI suggested, but that didn't do anything, so wondering if there may be another way.

The use case here is that I want to open a modal whenever someone clicks on a row, which I can detect the selectedRow difference, but then when the modal closes I want to reset the selection.

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

Successfully merging a pull request may close this issue.

2 participants