fix(TokenSelector): Crash when try to search token in SwapModal

- fix crash deep in ListView section handling; turns out ListView
doesn't like `section.property` being empty

Fixes #15445
This commit is contained in:
Lukáš Tinkl 2024-07-04 00:52:05 +02:00 committed by Lukáš Tinkl
parent 50b0d7d039
commit 57585652d0
1 changed files with 4 additions and 4 deletions

View File

@ -135,25 +135,25 @@ ComboBox {
model: root.popup.visible ? root.delegateModel : null
currentIndex: root.highlightedIndex
section.property: searchBox.text === "" ? "sectionName" : ""
section.property: "sectionName"
section.delegate: StatusBaseText {
required property string section
visible: searchBox.text === ""
width: parent.width
elide: Text.ElideRight
text: section
text: visible ? section : ""
color: Theme.palette.baseColor1
padding: Style.current.padding
}
}
StatusBaseText {
Layout.fillWidth: true
Layout.preferredHeight: 60
Layout.fillHeight: true
Layout.alignment: Qt.AlignCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
visible: listview.count === 0
color: Theme.palette.baseColor1
text: qsTr("No assets found")
}
}