From 869abe8b599663012095a88c3b1b7877491a6daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Tue, 2 Jul 2024 20:40:27 +0200 Subject: [PATCH] fix(TokenSelector): fix sections and empty search result - do not display sections with an active search - display a "No assets found text" when the search yields no results --- .../AppLayouts/Wallet/controls/TokenSelector.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/controls/TokenSelector.qml b/ui/app/AppLayouts/Wallet/controls/TokenSelector.qml index 1c3be349c7..78b24face8 100644 --- a/ui/app/AppLayouts/Wallet/controls/TokenSelector.qml +++ b/ui/app/AppLayouts/Wallet/controls/TokenSelector.qml @@ -124,7 +124,6 @@ ComboBox { } StatusDialogDivider { Layout.fillWidth: true - visible: listview.count } StatusListView { id: listview @@ -136,7 +135,7 @@ ComboBox { model: root.popup.visible ? root.delegateModel : null currentIndex: root.highlightedIndex - section.property: "sectionName" + section.property: searchBox.text === "" ? "sectionName" : "" section.delegate: StatusBaseText { required property string section width: parent.width @@ -146,6 +145,17 @@ ComboBox { padding: Style.current.padding } } + StatusBaseText { + Layout.fillWidth: true + Layout.preferredHeight: 60 + Layout.alignment: Qt.AlignCenter + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + visible: listview.count === 0 + color: Theme.palette.baseColor1 + + text: qsTr("No assets found") + } } background: StatusComboboxBackground {