pydantic copy is deprecated in favor of model_copy
This commit is contained in:
parent
37c360e786
commit
45cb36f59a
@ -1854,7 +1854,7 @@ class MemoizationLeaf(Component):
|
|||||||
"""
|
"""
|
||||||
comp = super().create(*children, **props)
|
comp = super().create(*children, **props)
|
||||||
if comp.get_hooks():
|
if comp.get_hooks():
|
||||||
comp._memoization_mode = cls._memoization_mode.copy(
|
comp._memoization_mode = cls._memoization_mode.model_copy(
|
||||||
update={"disposition": MemoizationDisposition.ALWAYS}
|
update={"disposition": MemoizationDisposition.ALWAYS}
|
||||||
)
|
)
|
||||||
return comp
|
return comp
|
||||||
|
@ -125,7 +125,7 @@ class EventActionsMixin(Base):
|
|||||||
Returns:
|
Returns:
|
||||||
New EventHandler-like with stopPropagation set to True.
|
New EventHandler-like with stopPropagation set to True.
|
||||||
"""
|
"""
|
||||||
return self.copy(
|
return self.model_copy(
|
||||||
update={"event_actions": {"stopPropagation": True, **self.event_actions}},
|
update={"event_actions": {"stopPropagation": True, **self.event_actions}},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class EventActionsMixin(Base):
|
|||||||
Returns:
|
Returns:
|
||||||
New EventHandler-like with preventDefault set to True.
|
New EventHandler-like with preventDefault set to True.
|
||||||
"""
|
"""
|
||||||
return self.copy(
|
return self.model_copy(
|
||||||
update={"event_actions": {"preventDefault": True, **self.event_actions}},
|
update={"event_actions": {"preventDefault": True, **self.event_actions}},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user