Skip to content

SearchField: optional accepted trigger on clear

When the clear button is pressed, the search field triggers accepted on the root element. This is great for explicit search, so that the search results are immediately cleared. It is not a good choice when immediately filtering based on the current state of the text field and using the accepted trigger to actually accept the first item, for example kickoff. The clear button clears the field and activates the focused item, if any. (See BUG 479233)

This change introduces a property filteredSearch. At present, it only inhibits the accepted signal, but could be used for future features that only make sense with explicit or immediate search. It defaults to false, corresponding to the existing behavior.

See plasma-desktop!2389 (closed) for additional rationale.

CCBUG: 479233

Edited by Christoph Wolk

Merge request reports