clear values in ui.input or ui.number by using a button #453
-
|
Hello and thank you for this development. I have a question, how to clear some inputs by using a button-element. thank you |
Beta Was this translation helpful? Give feedback.
Answered by
AL-THE-BOT-FATHER
Mar 5, 2023
Replies: 2 comments 4 replies
-
|
Simple example. from nicegui import ui
def clear_number():
number.value = None
def clear_input():
input.value = None
number = ui.number()
input = ui.input()
ui.button("Clear Number", on_click=clear_number)
ui.button("Clear Input", on_click=clear_input)
ui.run() |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
falkoschindler
-
|
OK - thank you - this is very helpful best regards |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple example.