Skip to content
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

Fix 2325 textinput validation #2596

Merged

Conversation

PistachioCannoli
Copy link
Contributor

@PistachioCannoli PistachioCannoli commented May 22, 2024

Refactored on_change() and _validate() calls within Toga core as a new private method _value_changed(). This private method validates first before calling the on_change handler. Then I made the change across the appropriate backends. I then added a test to the core API within an existing TextInput test to confirm a value changes and updated the documentation to reflect the change.

Resolved validation order which prevented input changes from being properly validated.

Fixes #2325

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@freakboy3742 freakboy3742 merged commit 2e7c6c8 into beeware:main May 23, 2024
31 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify invocation order of TextInput on_change and validation
2 participants