fix(StatusSeedPhraseInput): fix notifying inserting word done (#841)

This commit is contained in:
Michał 2022-08-08 17:38:43 +02:00 committed by Michał Cieślak
parent 2d22b4260e
commit 82707a0d48
2 changed files with 17 additions and 8 deletions

View File

@ -69,19 +69,34 @@ Column {
textEdit.input.anchors.leftMargin: 16
textEdit.input.anchors.rightMargin: 16
textEdit.input.anchors.topMargin: 11
textEdit.label: "Input with drop down selection list"
textEdit.label: "Input with drop down selection list" + (insertedWord ? ` (${insertedWord})` : "")
leftComponentText: "1"
inputList: ListModel {
ListElement {
seedWord: "add"
}
ListElement {
seedWord: "address"
}
ListElement {
seedWord: "panda"
}
ListElement {
seedWord: "posible"
}
ListElement {
seedWord: "win"
}
ListElement {
seedWord: "wine"
}
ListElement {
seedWord: "wing"
}
}
property string insertedWord: ""
onDoneInsertingWord: insertedWord = word
}
}

View File

@ -99,7 +99,6 @@ Item {
signal editClicked()
function setWord(word) {
seedWordInput.ignoreTextChange = true
seedWordInput.input.edit.text = word
}
@ -110,9 +109,8 @@ Item {
}
StatusInput {
property bool ignoreTextChange: false
id: seedWordInput
implicitWidth: parent.width
input.leftComponent: StatusBaseText {
rightPadding: 6
@ -123,10 +121,6 @@ Item {
}
input.acceptReturn: true
onTextChanged: {
if (ignoreTextChange) {
ignoreTextChange = false
return
}
filteredList.clear();
let textToCheck = text.trim()
if (textToCheck !== "") {