File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 19
19
cast ,
20
20
)
21
21
22
- from . import background_tasks , core
22
+ from . import background_tasks , core , helpers
23
23
from .awaitable_response import AwaitableResponse
24
24
from .dataclasses import KWONLY_SLOTS
25
25
from .slot import Slot
@@ -147,7 +147,13 @@ class MultiUploadEventArguments(UiEventArguments):
147
147
@dataclass (** KWONLY_SLOTS )
148
148
class ValueChangeEventArguments (UiEventArguments ):
149
149
value : Any
150
- previous_value : Any
150
+ previous_value : Any = ...
151
+
152
+ def __post_init__ (self ):
153
+ # DEPRECATED: previous_value will be required in NiceGUI 3.0
154
+ if self .previous_value is ...:
155
+ helpers .warn_once ('The new event argument `ValueChangeEventArguments.previous_value` is not set. '
156
+ 'In NiceGUI 3.0 this will raise an error.' )
151
157
152
158
153
159
@dataclass (** KWONLY_SLOTS )
You can’t perform that action at this time.
0 commit comments