noctalia-shell icon indicating copy to clipboard operation
noctalia-shell copied to clipboard

[FEATURE] Set ui.input text at runtime, allow clearing a search field

Open Yocraft-2000 opened this issue 2 weeks ago • 0 comments

Submission checklist

  • [x] I have searched existing issues and confirmed this has not been requested before.
  • [x] I have checked existing pull requests for similar changes.
  • [x] I have read SCOPE.md. This cannot already be done with existing configuration, IPC, a script-backed widget, or a plugin.

Feature type

Developer / API improvement

Feature summary

I want a way to set the ui.input text at runtime, to clear a search field

Motivation / use case

Building a plugin with a search field, I want to be able to clear the search field in certain situations. value only seeds the field, later renders never overwrite it.

Proposed solution

  • valueRev prop on ui.input (number). When it changes between renders, the field text is replaced by value once. Same pattern as scrollToBottomRev / revealKey on ui.scroll.
  • Imperative call: panel.clearInput(key) or panel.setInputText(key, text), the key being the key prop of a ui.input node, text is the new content ("" to clear)

Alternatives considered

No response

References / related projects

No response

Additional context

No response

Yocraft-2000 avatar Nov 16 '26 13:11 Yocraft-2000