fix(AssetSelector): always select first item when selector component is completed

This fixes a bug that, when the supplied assets change the AssetSelector resets its
selected asset as well

Previously, it would keep the selected asset around, even when the asset list has changed,
leaving it in an invalid state
This commit is contained in:
Pascal Precht 2020-08-20 13:50:30 +02:00 committed by Iuri Matias
parent 84481ff308
commit 771b07c17c

View File

@ -63,7 +63,7 @@ Item {
property bool isLastItem: index === assets.rowCount() - 1
Component.onCompleted: {
if (!selectedAsset && isFirstItem) {
if (isFirstItem) {
root.selectedAsset = { address, name, value, symbol, fiatBalanceDisplay, fiatBalance }
}
}