Skip to content

Commit

Permalink
docs(discussion): Add sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Jul 6, 2023
1 parent dbbeab5 commit 5c2a424
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/validation/discussion/280.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from trame.app import get_server
from trame.ui.vuetify import VAppLayout
from trame.widgets import vuetify

server = get_server()


@server.state.change("value")
def update_number(value, **kwargs):
print(f"{type(value)}({value})")


with VAppLayout(server):
vuetify.VTextField(v_model_number=("value", 1), type="number")

server.start()

0 comments on commit 5c2a424

Please sign in to comment.