This repository was archived by the owner on Aug 29, 2025. It is now read-only.
- force value change on 'enter', not just lost focus#52
Merged
Marc-Andre-Rivet merged 7 commits intomasterfrom Aug 29, 2018
Merged
- force value change on 'enter', not just lost focus#52Marc-Andre-Rivet merged 7 commits intomasterfrom
Marc-Andre-Rivet merged 7 commits intomasterfrom
Conversation
- fix demo bug that merges state updates incorrectly
demo/App.js
Outdated
| }); | ||
| this.setState(prevState => ({ | ||
| tableProps: merge(prevState.tableProps, newProps) | ||
| })); |
Contributor
Author
There was a problem hiding this comment.
Sometimes the state gets changed multiple times in short succession, React doesn't have time to update the state between the calls and changes get lost.
|
|
||
| // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL) | ||
| export const isCtrlDown = e => (e.ctrlKey || e.metaKey) && !e.altKey; | ||
| export const isCtrlDown = (e: KeyboardEvent) => (e.ctrlKey || e.metaKey) && !e.altKey; |
Contributor
Author
There was a problem hiding this comment.
Easy switch to Typescript
|
|
||
| DOM.focused.type(`abc${Key.Enter}`); | ||
|
|
||
| cy.get('#container').should('have.value', `[249][0] = ${initialValue} -> abc${initialValue}`); |
Contributor
Author
There was a problem hiding this comment.
The BE will update the container field if 'Enter' triggered the df update as it should be.
Contributor
Author
|
Please review if you have some time @VeraZab @T4rk1n @valentijnnieman @wbrgss. Thx. |
T4rk1n
reviewed
Aug 28, 2018
| if dataframe is None or previous is None: | ||
| return modification | ||
|
|
||
| for (y, row) in enumerate(dataframe): |
Contributor
There was a problem hiding this comment.
You don't need the () when unpacking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for issue:
#50