File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44from nova .trame import ThemedApp
55from nova .trame .view .components import InputField
66from nova .trame .view .layouts import VBoxLayout
7+ from trame .widgets import client
78from trame .widgets import vuetify3 as vuetify
89
910from .model import Model
@@ -25,6 +26,12 @@ def __init__(self) -> None:
2526
2627 def create_ui (self ) -> None :
2728 with super ().create_ui () as layout :
29+ # This instructs the user interface to reset itself to the most recent valid state when a browser connects
30+ # to the tool or the browser is refreshed. This is not appropriate for all situations, so it is not a
31+ # default behavior at this time. You can disable this line and then refresh your browser while the user
32+ # interface is in an error state to see the difference between the two behaviors.
33+ client .ClientTriggers (mounted = self .view_model .init_view )
34+
2835 with layout .pre_content :
2936 vuetify .VBanner (
3037 "The form is in an error state." ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def update_view_state(self) -> None:
4747 self .view_state_bind .update_in_view (self .view_state )
4848
4949 def init_view (self ) -> None :
50- self .view_state .has_errors = False
50+ self .view_state .errors = []
5151
5252 self .update_form_data ()
5353 self .update_view_state ()
You can’t perform that action at this time.
0 commit comments