reflex/reflex/components
Masen Furer bd799a2680
Override _var_is_string when handling str literals (#3473)
* Override _var_is_string when handling str literals

Maintain the pre 0.5.4 behavior when dealing with string literal
props, without displaying the deprecation warning.

Wait, isn't it weird to pass `_var_is_string=False` when the type is actually a str??

Yes, yes it is. However this is currently needed to avoid raising the
DeprecationWarning internally. These str-type vars with
_var_is_string set to false are handled by
`reflex.utils.format.format_prop`, but setting them to be
_var_is_string=True causes them to get quoted twice, which is not
what we want.

Var operations refactor will take care of cleaning this up, but for
now, we will go with the hack.

* Ignore type checks

Since I'm using an `isinstance` check now, the type checker thinks that `value`
could possibly be a string (instead of Any), which raises typing errors that
have to be ignored (they were ignored before implicitly due to being Any-typed)
2024-06-11 13:18:34 -07:00
..
base [REF-2821]Improve Dynamic Imports (#3345) 2024-05-31 16:43:10 +00:00
chakra Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
core Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
datadisplay Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
el Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
gridjs [REF-2787] add_hooks supports Var-wrapped hooks (#3248) 2024-05-15 14:59:45 -07:00
lucide Remove deprecations for 0.5.0 (#3222) 2024-05-07 08:55:42 -07:00
markdown Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
media Refactor chakra components into separate folder (#2315) 2023-12-21 09:52:08 -08:00
moment [REF-2821]Improve Dynamic Imports (#3345) 2024-05-31 16:43:10 +00:00
next [REF-2524] Tuple unpacking should apply at component level (#3062) 2024-04-11 14:04:19 -07:00
plotly Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
radix Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
react_player [REF-2524] Tuple unpacking should apply at component level (#3062) 2024-04-11 14:04:19 -07:00
recharts Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
sonner Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
suneditor generate pyi files when building/publishing 3rd party component (#2945) 2024-03-29 09:54:21 -07:00
tags Pass _var_is_string parameter to Var.create (#3470) 2024-06-10 14:32:32 -07:00
__init__.py [REF-2821]Improve Dynamic Imports (#3345) 2024-05-31 16:43:10 +00:00
__init__.pyi [REF-2821]Improve Dynamic Imports (#3345) 2024-05-31 16:43:10 +00:00
component.py Override _var_is_string when handling str literals (#3473) 2024-06-11 13:18:34 -07:00
literals.py Chakra input component type_ prop literal (#2292) 2023-12-18 15:43:51 -08:00
props.py Get action, cancel, on_dismiss and on_auto_close working for rx.toast (#3216) 2024-05-15 11:54:52 +02:00