Adds the ability to revert an edit by hitting the escape key.#22
Conversation
|
hey @patrick-jones , no need to add a new state for this. Check the method "pageClick" , which essentially does what you're describing. Use a similar function (this.setState(this.defaultState)) when the ESC button is clicked |
|
@nadbm , that doesn't seem to revert the cell to the original value. |
|
Yep my mistake, you're right. Can you add a test? Thanks for the PR 💯 |
|
There's a test in there, line 669 of Datasheet.js. By the way, I really like the approach you've taken with this grid. Other grids are all to monolithic, baking too much directly in the grid itself instead of being model-driven. I actually need a good grid for a work project I'm doing. Do you mind if a take a swipe at adding a few features such as dragging/dropping rows, resizable columns? |
|
Right, git collapsed a lot of it so did not see the test. I'll merge this now. And for those features, go right ahead. I wanted to only keep UX logic in this component, everything else can be handled by the user. So drag/drop and resizable columns definitely fits right in. |
Closes #21