fix: copy state dict on change

This commit is contained in:
Dowon
2024-01-10 22:56:17 +09:00
parent a45740f3ae
commit 8f6302881a

View File

@@ -59,6 +59,9 @@ def suffix(n: int, c: str = " ") -> str:
def on_widget_change(state: dict, value: Any, *, attr: str):
if "is_api" in state:
state = state.copy()
state.pop("is_api")
state[attr] = value
return state