-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
from datastack import datastack
from varname.helpers import exec_code
ds = datastack(main=True)
count = 0
delta = 1
ds.subheader("DataStack click counter app " + str(count), id="id_count")
tab1, tab2 = ds.tabs(["tab1", "tab2"])
tab1.subheader("this is subheader", id="id")
#
#
# def inc_count():
# global count
# global delta
# count += delta
#
#
# tab1.button("Click", on_click=inc_count)
# tab1.subheader("counts: " + str(count), id="id_count2")
# code = "tab1.button('dynamic text', on_click=inc_count)"
# exec_code(code)
#
#
# # input
def new_input(a1: any, xi_new_value):
global delta
delta = xi_new_value
tab1.subheader('Input value', id="id_input")
input_value: int = 0
input_value = tab1.input('Input:', str(input_value), id="id_input_value", on_change=new_input, args=(0, input_value))
tab1.write("counts: " + str(input_value))
value on input element does not changed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels