-
-
Notifications
You must be signed in to change notification settings - Fork 74
- force value change on 'enter', not just lost focus #52
Conversation
- fix demo bug that merges state updates incorrectly
demo/App.js
Outdated
}); | ||
this.setState(prevState => ({ | ||
tableProps: merge(prevState.tableProps, newProps) | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
].includes(keyCode); | ||
} | ||
|
||
// 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy switch to Typescript
|
||
DOM.focused.type(`abc${Key.Enter}`); | ||
|
||
cy.get('#container').should('have.value', `[249][0] = ${initialValue} -> abc${initialValue}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BE will update the container field if 'Enter' triggered the df update as it should be.
Please review if you have some time @VeraZab @T4rk1n @valentijnnieman @wbrgss. Thx. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 looks good to me.
if dataframe is None or previous is None: | ||
return modification | ||
|
||
for (y, row) in enumerate(dataframe): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need the () when unpacking.
Fix for issue:
#50