Merge ab3af5ca29
into 98f50811f9
This commit is contained in:
commit
a011856e65
@ -857,6 +857,9 @@ class Config(Base):
|
||||
# Path to file containing key-values pairs to override in the environment; Dotenv format.
|
||||
env_file: Optional[str] = None
|
||||
|
||||
# Whether to automatically create setters for state base vars
|
||||
state_auto_setters: bool = True
|
||||
|
||||
# Whether to display the sticky "Built with Reflex" badge on all pages.
|
||||
show_built_with_reflex: Optional[bool] = None
|
||||
|
||||
|
@ -1018,7 +1018,8 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
|
||||
f'Found var "{prop._js_expr}" with type {prop._var_type}.'
|
||||
)
|
||||
cls._set_var(prop)
|
||||
cls._create_setter(prop)
|
||||
if get_config().state_auto_setters:
|
||||
cls._create_setter(prop)
|
||||
cls._set_default_value(prop)
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user