Change ExploreComponent to signal text changes and set filterText from there
This commit is contained in:
@@ -66,13 +66,18 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Emitted when the text is changed in the search field.
|
||||||
|
*/
|
||||||
|
signal textChanged(string newText)
|
||||||
|
|
||||||
Kirigami.SearchField {
|
Kirigami.SearchField {
|
||||||
Layout.topMargin: Kirigami.Units.smallSpacing
|
Layout.topMargin: Kirigami.Units.smallSpacing
|
||||||
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: root.desiredWidth ? root.desiredWidth - menuButton.width - root.spacing : -1
|
Layout.preferredWidth: root.desiredWidth ? root.desiredWidth - menuButton.width - root.spacing : -1
|
||||||
visible: !root.collapsed
|
visible: !root.collapsed
|
||||||
onTextChanged: sortFilterRoomListModel.filterText = text
|
onTextChanged: root.textChanged(text)
|
||||||
KeyNavigation.tab: listView
|
KeyNavigation.tab: listView
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -402,6 +402,10 @@ Kirigami.Page {
|
|||||||
desiredWidth: root.width - Kirigami.Units.largeSpacing
|
desiredWidth: root.width - Kirigami.Units.largeSpacing
|
||||||
collapsed: root.collapsed
|
collapsed: root.collapsed
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
|
|
||||||
|
onTextChanged: newText => {
|
||||||
|
sortFilterRoomListModel.filterText = newText;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user