Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Sep 16, 2025

Describe your changes

Manually reverts the logic from these two changes to prevent some unexpected issues with NumberInput usage:

GitHub Issue Link (if applicable)

Testing Plan

  • Added e2e test for one of the regression, the rest should be covered well with the existing tests.

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Contributor

snyk-io bot commented Sep 16, 2025

🎉 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)

@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12547/streamlit-1.49.1-py3-none-any.whl
🕹️ Preview app pr-12547.streamlit.app (☁️ Deploy here if not accessible)

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR change:bugfix PR contains bug fix implementation impact:users PR changes affect end users labels Sep 16, 2025
@lukasmasuch lukasmasuch requested a review from Copilot September 16, 2025 23:54
@lukasmasuch lukasmasuch marked this pull request as ready for review September 16, 2025 23:54
Copy link
Contributor

Copilot AI left a 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 useMemo values 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

@lukasmasuch lukasmasuch requested a review from Copilot September 17, 2025 00:01
Copy link
Contributor

Copilot AI left a 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.

lukasmasuch and others added 2 commits September 17, 2025 15:53
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
lukasmasuch and others added 3 commits September 17, 2025 18:07
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Copy link
Contributor

@sfc-gh-nbellante sfc-gh-nbellante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukasmasuch lukasmasuch merged commit dec9d20 into develop Sep 17, 2025
38 checks passed
@lukasmasuch lukasmasuch deleted the revert-number-input-refactoring branch September 17, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:bugfix PR contains bug fix implementation impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

st.number_input focus not selecting/highlighting the value (since 1.49)

3 participants