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

Provides "index" parameter in "beforeSaveCell" and "afterSaveCell" callbacks #1751

Closed
pcmnac opened this issue Nov 14, 2017 · 4 comments
Closed

Comments

@pcmnac
Copy link

pcmnac commented Nov 14, 2017

I'm using react-bootstrap-table with redux and would be great if it provides "index" parameter in "beforeSaveCell" and "afterSaveCell" callbacks for cell editing. To workaround it, I had to put a aditional "index" field in my data, but requires me to do a map() always data is inserted or removed from my collection.

@AllenFang
Copy link
Owner

@pcmnac sorry for lately reply, what kind of index you need? row index or cell index? thanks

@pcmnac
Copy link
Author

pcmnac commented Nov 18, 2017

@AllenFang Thanks for reply. For my specific case, I need row index (just like you can get it in custom column render). When a cell is edited I dispatch an action to my reducer and I need to inform which row was modified. You can consider add other params (like "extra" or "columnIndex", or even a "meta" object grouping all this additional info)

@AllenFang
Copy link
Owner

@pcmnac cool, I will support this in next version, thanks

@AllenFang
Copy link
Owner

@pcmnac fixed on v4.1.5,
there a props object will be passed as fifth argument for beforeSaveCell and fourth argument for afterSaveCell. thanks

powellandy pushed a commit to powellandy/react-bootstrap-table that referenced this issue Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants