How do I delete from a state ? #326
-
I have a dict stored in a state that I use for a repeater. With a button click, I want to remove elements from this dict. It seems I can't do regular, dict operations for it e.g. Whats the recommended way to do it ? |
Beta Was this translation helpful? Give feedback.
Answered by
FabienArcellier
Mar 19, 2024
Replies: 1 comment 2 replies
-
I found this: but is there a more elegant solution than reconstructing the dict ? It seems very resource-intense to me. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A more elegant is coming thanks to the work of @mmikita95
In the next release (the next week), you would be able to just
del state["repeater_state]["item_1"]
. It's already in the version on dev branch.#214