ztawil
ztawil•11mo ago

Text input debounce

Great work everyone--so exciting to see this in the public. Is there a marimic(?) way to debounce running downstream cells for text areas while I'm inputing text? Especially if the text area is used for the input to an API call
5 Replies
Akshay
Akshay•11mo ago
Hi Zein!! Great to see you here 🙂
import marimo

__generated_with = "0.1.76"
app = marimo.App()


@app.cell
def __():
import marimo as mo
return mo,


@app.cell
def __(mo):
form = mo.ui.text().form()
form
return form,


@app.cell
def __(form):
form.value
return


if __name__ == "__main__":
app.run()
import marimo

__generated_with = "0.1.76"
app = marimo.App()


@app.cell
def __():
import marimo as mo
return mo,


@app.cell
def __(mo):
form = mo.ui.text().form()
form
return form,


@app.cell
def __(form):
form.value
return


if __name__ == "__main__":
app.run()
ztawil
ztawilOP•11mo ago
Oh--form Derp
Akshay
Akshay•11mo ago
I think that should work? The form is not the prettiest as far as UI goes, been meaning to fix that. We could also add an optional submit button to text inputs to make it more natural
ztawil
ztawilOP•11mo ago
Yeah, I was thinking button, but I figured this couldn't be the first time this has been a thing. Excited to get something up. Thanks @Akshay
Akshay
Akshay•11mo ago
Yup happy to help!