-
Notifications
You must be signed in to change notification settings - Fork 379
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
selected rows are lost when the component re-render #151
Comments
@bjrmatos I'll take a look one of these days and fix it. stay tuned. |
thnks @cosminnicula, i think we should discuss this in #153 |
Hmmm, I like the look of #153, but no multiple selection support with re-rendering is very problematic for me. |
Ah, setting a prop as follows seems to fix things. selectedRowIds={this.state.selected} onRowClick should be paralleled by another function called onSelectionChange that happens after things are interacted with. |
can you clarify what you meant by this, I'm trying to get checkboxes to persist after rerendering, but couln't seem to get it to work @aphillipo Thanks! |
I realize that this issue is a bit older but we have released a new version of Griddle. We've defaulted to providing less features out of the box (like row selection) but added additional customization options and the ability for user/community plugins. In addition to this, the state management is a bit more flexible and shouldn't lose part of the state. |
Hi, i've found another bug in #145, i've got this:
the only way to get access to the selected row ids is via a ref in the griddle component (i think this is problematic, because makes harder to sync the state of App component with the selected rows, maybe we could find a nice way to keep in sync App state), the problem that i have found is if my App component re-render for what-ever reason (a call to
setState
in another part) the selected rows are lost.I've found that the problem is this logic in
componentWillReciveProps
:any ideas how to improve this feature?
The text was updated successfully, but these errors were encountered: