effects/windowview: Bind to search field using textEdited signal
This special signal was designed to remove the need for such bikesheddings and workarounds. Use it to react to user-driven changes. FIXED-IN: 5.26
This commit is contained in:
parent
984388dba4
commit
a3c6db3ee7
1 changed files with 2 additions and 7 deletions
|
@ -106,18 +106,13 @@ Item {
|
|||
OpacityAnimator { duration: container.effect.animationDuration; easing.type: Easing.OutCubic }
|
||||
}
|
||||
|
||||
// Binding loops will be avoided from the fact that setting the text to the same won't emit textChanged
|
||||
// We can't use activeFocus because is not reliable on qml effects
|
||||
onTextChanged: {
|
||||
text: effect.searchText
|
||||
onTextEdited: {
|
||||
effect.searchText = text;
|
||||
heap.resetSelected();
|
||||
heap.selectNextItem(WindowHeap.Direction.Down);
|
||||
}
|
||||
Binding {
|
||||
target: searchField
|
||||
property: "text"
|
||||
value: effect.searchText
|
||||
}
|
||||
Keys.priority: Keys.AfterItem
|
||||
Keys.forwardTo: heap
|
||||
Keys.onPressed: {
|
||||
|
|
Loading…
Reference in a new issue