This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: DOS-237 - Added props.onchange to the callback dependency of numeric inputs and added onKeyDown property so we can bind to it #58
Merged
Conversation
This file contains 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
…not change in sync with the parent
…S-437_numeric_input_deps_issue
jsumiguin-causalens
requested review from
krzysztof-causalens and
Roman-Kornev
December 18, 2023 23:45
jsumiguin-causalens
requested a review
from patricia-causalens
as a code owner
December 18, 2023 23:45
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, let's also add a test case as you said, you can create a simple wrapper component in-line within the test and check the behaviour
patricia-causalens
suggested changes
Dec 19, 2023
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.
Hi Jon, could we also add a changelog entry?
jsumiguin-causalens
changed the title
DO NOT MERGE YET - DOS-237 - Added props.onchange to the callback dependency
Bugfix: DOS-237 - Added props.onchange to the callback dependency of numeric inputs and added onKeyDown property so we can bind to it
Dec 19, 2023
jsumiguin-causalens
requested review from
patricia-causalens and
krzysztof-causalens
December 19, 2023 18:44
@patricia-causalens, thanks, added now. Can you confirm if it's the correct format? Cheers. 🙏 |
jsumiguin-causalens
changed the title
Bugfix: DOS-237 - Added props.onchange to the callback dependency of numeric inputs and added onKeyDown property so we can bind to it
Fix: DOS-237 - Added props.onchange to the callback dependency of numeric inputs and added onKeyDown property so we can bind to it
Dec 19, 2023
krzysztof-causalens
approved these changes
Dec 19, 2023
patricia-causalens
approved these changes
Dec 20, 2023
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.
LGTM
patricia-causalens
pushed a commit
that referenced
this pull request
Jan 5, 2024
…eric inputs and added onKeyDown property so we can bind to it (#58) * Added props.onchange to the callback dependency as the onChange does not change in sync with the parent * added tests and changelog * fixed changelog * removed if needed
6 tasks
patricia-causalens
added a commit
that referenced
this pull request
Jan 9, 2024
* merge node dragging bug * merge soft edge fix * Fix: DOS-237 - Added props.onchange to the callback dependency of numeric inputs and added onKeyDown property so we can bind to it (#58) * Added props.onchange to the callback dependency as the onChange does not change in sync with the parent * added tests and changelog * fixed changelog * removed if needed * update version to 1.4.4 * updating changelogs * support for tiers in spring layout * support in marketing layout * added missing changelog * adjusting ordering force * PR feedback --------- Co-authored-by: Krzysztof Bielikowicz <[email protected]> Co-authored-by: Jonathan Sumiguin <[email protected]>
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.
Motivation and Context
Currently, if the props.onChange has any changes on the parent component(i.e. a state variable on parent that changes for some reason) the function on
props.onChange
becomes outdated and only gets updated if theprops.value
changes.Also, currently NumericInput does not expose the onKeyDown event so we can add our own keydown events to it.
Implementation Description
onChange
callback.Any new dependencies Introduced
N/A
How Has This Been Tested?
This has been tested locally and by unit tests.
PR Checklist:
Screenshots (if appropriate):