diff --git a/src/qml/ExploreComponent.qml b/src/qml/ExploreComponent.qml index fc0a74cca..38418d529 100644 --- a/src/qml/ExploreComponent.qml +++ b/src/qml/ExploreComponent.qml @@ -66,13 +66,18 @@ RowLayout { } } + /** + * @brief Emitted when the text is changed in the search field. + */ + signal textChanged(string newText) + Kirigami.SearchField { Layout.topMargin: Kirigami.Units.smallSpacing Layout.bottomMargin: Kirigami.Units.smallSpacing Layout.fillWidth: true Layout.preferredWidth: root.desiredWidth ? root.desiredWidth - menuButton.width - root.spacing : -1 visible: !root.collapsed - onTextChanged: sortFilterRoomListModel.filterText = text + onTextChanged: root.textChanged(text) KeyNavigation.tab: listView } diff --git a/src/qml/RoomListPage.qml b/src/qml/RoomListPage.qml index 0f8d90e21..7f68bb7bf 100644 --- a/src/qml/RoomListPage.qml +++ b/src/qml/RoomListPage.qml @@ -402,6 +402,10 @@ Kirigami.Page { desiredWidth: root.width - Kirigami.Units.largeSpacing collapsed: root.collapsed connection: root.connection + + onTextChanged: newText => { + sortFilterRoomListModel.filterText = newText; + } } }