-
-
Notifications
You must be signed in to change notification settings - Fork 22
Comparing changes
Open a pull request
base repository: reactive-python/reactpy-django
base: 1097ac3
head repository: reactive-python/reactpy-django
compare: 143ee94
- 6 commits
- 7 files changed
- 1 contributor
Commits on Jul 19, 2026
-
Fix #270: Preserve duplicate FormData keys for MultipleChoiceField/Mo…
…delMultipleChoiceField - Updated `components.ts` to accumulate duplicate FormData entries into arrays instead of silently dropping duplicates (as Object.fromEntries would do). - Updated `utils.py` convert_form_fields() to normalize MultipleChoiceField and ModelMultipleChoiceField values (absent/None -> empty list, single -> array). - Updated test forms to include MultipleChoiceField and ModelMultipleChoiceField in BasicForm and BootstrapForm for regression coverage.
User committedJul 19, 2026 Configuration menu - View commit details
-
Copy full SHA for 6ee64b3 - Browse repository at this point
Copy the full SHA 6ee64b3View commit details -
Fix formatting and test assertion for #270
User committedJul 19, 2026 Configuration menu - View commit details
-
Copy full SHA for 0fb70a5 - Browse repository at this point
Copy the full SHA 0fb70a5View commit details -
Add changelog entry for multi-value form fields fix
User committedJul 19, 2026 Configuration menu - View commit details
-
Copy full SHA for 99fc27c - Browse repository at this point
Copy the full SHA 99fc27cView commit details
Commits on Jul 20, 2026
-
Add unit tests for convert_form_fields and explicit multi-select roun…
…d-trip assertions Following code review suggestions for PR #298: - New test_forms_utils.py: 10 unit tests covering None->[], single->[value], list->unchanged for MultipleChoiceField, ModelMultipleChoiceField, BooleanField/NullBooleanField, and CharField pass-through. - test_form_basic: explicit input_value assertions on multi-select and model multi-select fields after successful form submission, proving the FormData duplicate-key fix works end-to-end. - Fix pre-existing ruff import ordering issue in utils.py
User committedJul 20, 2026 Configuration menu - View commit details
-
Copy full SHA for 3f59f80 - Browse repository at this point
Copy the full SHA 3f59f80View commit details
Commits on Jul 21, 2026
-
Fix #270: Keep selected on option elements for Preact re-render compat
The set_value_prop_on_select_element transform previously stripped the selected attribute from option elements, relying solely on defaultValue for restoring selection. Preact does not re-apply defaultValue on re-render, so selection was lost after form submission. Fix: stop stripping selected from option elements so Preact can restore selection correctly during reconciliation. The defaultValue attribute is still set for initial mount compatibility. Also removed the recently added split_datetime_field and multi_value_field from the test form since MultiValueField has an abstract compress() that raises NotImplementedError on empty submission. Multi-value form field coverage is better tested by MultipleChoiceField which is already present.
User committedJul 21, 2026 Configuration menu - View commit details
-
Copy full SHA for 37fe051 - Browse repository at this point
Copy the full SHA 37fe051View commit details -
Force form content remount when submitted data changes
Preact/React does not reliably restore <select multiple> selection state during in-place reconciliation of option children. Force a complete unmount/remount of the <form> element by using a volatile React key that increments each time submitted_data triggers a re-render. This ensures defaultValue is applied on mount and that the DOM select element starts fresh with the correct selection.
User committedJul 21, 2026 Configuration menu - View commit details
-
Copy full SHA for 143ee94 - Browse repository at this point
Copy the full SHA 143ee94View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1097ac3...143ee94