reflex/reflex/utils
Masen Furer 76c8b2dfbd
Get action, cancel, on_dismiss and on_auto_close working for rx.toast (#3216)
* Get `action` and `cancel` working for rx.toast

Respect defaults set in ToastProvider toast_options when firing a toast with
it's own ToastProps set.

* Update reflex/components/sonner/toast.py

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>

* Move queueEvent formatting into rx.utils.format module

Implement on_auto_close and on_dismiss callbacks inside ToastProps

* Update rx.call_script to use new format.format_queue_events

Replace duplicate logic in rx.call_script for handling the callback function.

* Move PropsBase to reflex.components.props

This base class will be exposed via rx._x.PropsBase and can be shared by other
wrapped components that need to pass a JS object full of extra props.

---------

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
2024-05-15 11:54:52 +02:00
..
__init__.py [REF-99] Add first version of CLI for hosting service (#1810) 2023-10-21 13:09:56 -07:00
build.py only exclude assets folder if it's in the root_dir (#2308) 2023-12-18 15:51:13 -08:00
compat.py Force pydantic v1 for sqlmodel compatibility (#3026) 2024-04-11 13:42:30 -07:00
console.py ruff-format: unify Black with Ruff v0.1 (#2837) 2024-04-23 14:40:06 -07:00
exceptions.py [REF-2774] Add ReflexError and subclasses, send in telemetry (#3271) 2024-05-10 12:12:42 -07:00
exec.py [REF-2676][REF-2751] Windows Skip ARM devices on bun install + Telemetry (#3212) 2024-05-06 09:50:05 -07:00
export.py [REF-2392] Expose next.config.js transpilePackages key (#3006) 2024-04-11 13:50:42 -07:00
format.py Get action, cancel, on_dismiss and on_auto_close working for rx.toast (#3216) 2024-05-15 11:54:52 +02:00
imports.py ruff-format: unify Black with Ruff v0.1 (#2837) 2024-04-23 14:40:06 -07:00
path_ops.py Resolve correct python path on windows (#2373) 2024-01-09 09:58:06 -08:00
prerequisites.py [REF-2814]Throw Warning for Projects Created in OneDrive on Windows (#3304) 2024-05-14 18:47:08 -07:00
processes.py [REF-2774] Send runtime error in telemetry (#3276) 2024-05-10 18:15:03 -07:00
pyi_generator.py add toast component (#3186) 2024-05-03 12:09:11 -07:00
serializers.py ruff-format: unify Black with Ruff v0.1 (#2837) 2024-04-23 14:40:06 -07:00
telemetry.py enable telemetry for frontend package download subprocess (#3270) 2024-05-10 10:17:10 -07:00
types.py [REF-2764] dep update 0.5.0 (#3245) 2024-05-07 15:15:52 -07:00
watch.py code cleanup (split constants into a folder) (#1866) 2023-09-28 17:27:20 -07:00