mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 03:28:52 +00:00
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
This commit is contained in:
parent
ca3d1ba067
commit
869abe8b59
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user