From 3ed84db2e6697c46b480533d5e3d5421bdbacae6 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:30:27 -0800 Subject: [PATCH] Add thread_sensitive arg to ensure_async func --- docs/src/reference/components.md | 3 ++- docs/src/reference/hooks.md | 4 ++-- src/reactpy_django/components.py | 7 ++++++- src/reactpy_django/forms/components.py | 9 +++++---- src/reactpy_django/hooks.py | 4 ++-- src/reactpy_django/utils.py | 4 ++++ 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/docs/src/reference/components.md b/docs/src/reference/components.md index bbf12c58..26feda67 100644 --- a/docs/src/reference/components.md +++ b/docs/src/reference/components.md @@ -409,11 +409,12 @@ Compatible with both [standard Django forms](https://docs.djangoproject.com/en/s | `#!python on_success` | `#!python AsyncFormEvent | SyncFormEvent | None` | A callback function that is called when the form is successfully submitted. | `#!python None` | | `#!python on_error` | `#!python AsyncFormEvent | SyncFormEvent | None` | A callback function that is called when the form submission fails. | `#!python None` | | `#!python on_receive_data` | `#!python AsyncFormEvent | SyncFormEvent | None` | A callback function that is called before newly submitted form data is rendered. | `#!python None` | - | `#!python on_change` | `#!python AsyncFormEvent | SyncFormEvent | None` | A callback function that is called when the form is changed. | `#!python None` | + | `#!python on_change` | `#!python AsyncFormEvent | SyncFormEvent | None` | A callback function that is called when a form field is modified by the user. | `#!python None` | | `#!python auto_save` | `#!python bool` | If `#!python True`, the form will automatically call `#!python save` on successful submission of a `#!python ModelForm`. This has no effect on regular `#!python Form` instances. | `#!python True` | | `#!python extra_props` | `#!python dict[str, Any] | None` | Additional properties to add to the `#!html