Skip to content

[0.9] remove ids refs from form_data #5430

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Lendemor
Copy link
Contributor

@Lendemor Lendemor commented Jun 10, 2025

Passing both name and ids refs can lead to duplicate data, we should only pass form data by name.

Fix #5418 (when extracting hooks in stateful components, the form hook still refer refs but the import is removed, leading to the error)

Copy link

codspeed-hq bot commented Jun 10, 2025

CodSpeed Performance Report

Merging #5430 will not alter performance

Comparing lendemor/fix_form_data (32ff737) with main (e9cd7e0)

Summary

✅ 8 untouched benchmarks

@Lendemor Lendemor marked this pull request as ready for review June 10, 2025 16:36
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Simplified form data handling by removing ID-based refs, preventing duplicate submissions and fixing a production build ReferenceError in stateful components.

  • Modified reflex/components/el/elements/forms.py to exclusively use FormData object for submissions, removing refs-based collection
  • Updated test suite in tests/integration/test_form_submit.py to remove ID-based form tests ('id-radix', 'id-html'), standardizing on name attributes
  • Fixed ReferenceError in production builds where refs was undefined after hook extraction in stateful components (Issue #5418)

3 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@Lendemor Lendemor changed the title remove ids refs from form_data [0.9] remove ids refs from form_data Jun 13, 2025
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.

Exception: "ReferenceError: refs is not defined"
1 participant