From 6142a4eecdbcbde892dddb17bbb6cb950b80b456 Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Fri, 15 Dec 2023 17:36:54 +0100 Subject: [PATCH] Add set_all --- pyjecteur/reactive.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyjecteur/reactive.py b/pyjecteur/reactive.py index f42d625..0b90d69 100644 --- a/pyjecteur/reactive.py +++ b/pyjecteur/reactive.py @@ -149,6 +149,11 @@ class L(ReactiveMixin): # ruff: disable=invalid-name if self.light: self.light.attr_set_hook(self.key, self) + def set_all(self, l): + self._val = l + if self.light: + self.light.attr_set_hook(self.key, self) + def __iter__(self): return self._val.__iter__()