-
Notifications
You must be signed in to change notification settings - Fork 4k
Revert number input component refactoring #12547
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
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
✅ PR preview is ready!
|
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.
Pull Request Overview
This PR reverts previous refactoring of the NumberInput component to address unexpected issues with NumberInput usage. The revert specifically undoes changes related to how formatted values are computed and displayed in the input field.
- Reverts from computed
useMemovalues back to explicit state management for formatted values - Restores direct formatted value updates in change handlers and effect hooks
- Removes the conditional display logic that differentiated between focused and unfocused states
frontend/lib/src/components/widgets/NumberInput/NumberInput.tsx
Outdated
Show resolved
Hide resolved
frontend/lib/src/components/widgets/NumberInput/NumberInput.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
sfc-gh-nbellante
left a comment
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
Describe your changes
Manually reverts the logic from these two changes to prevent some unexpected issues with NumberInput usage:
st.number_input#12351GitHub Issue Link (if applicable)
st.number_inputfocus not selecting/highlighting the value (since 1.49) #12526Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.