Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to clear input anymore #3045

Closed
rodja opened this issue May 10, 2024 · 1 comment
Closed

Not able to clear input anymore #3045

rodja opened this issue May 10, 2024 · 1 comment

Comments

@rodja
Copy link
Member

rodja commented May 10, 2024

Brought up on Discord: It is not possible to clear the data of an input element anymore:

input = ui.input(value='some text')
ui.button('clear', on_click=lambda: input.clear)
ui.button('empty', on_click=lambda: input.set_value(''))
@rodja rodja added the bug Something isn't working label May 10, 2024
@rodja rodja added this to the 1.4.25 milestone May 10, 2024
@falkoschindler
Copy link
Contributor

falkoschindler commented May 10, 2024

  1. You're not calling input.clear.
  2. As far as I know, clear never cleared the value, but is only meant to clear child elements.
  3. In contrast to KrakenDev's statement on Discord, input.set_value('') seems to work fine.

@falkoschindler falkoschindler closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
@falkoschindler falkoschindler removed the bug Something isn't working label May 13, 2024
@falkoschindler falkoschindler removed this from the 1.4.25 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants