fix(StatusSeedPhraseInput): fix notifying inserting word done (#841)
This commit is contained in:
parent
789b773649
commit
56f36ed627
|
@ -69,19 +69,34 @@ Column {
|
||||||
textEdit.input.anchors.leftMargin: 16
|
textEdit.input.anchors.leftMargin: 16
|
||||||
textEdit.input.anchors.rightMargin: 16
|
textEdit.input.anchors.rightMargin: 16
|
||||||
textEdit.input.anchors.topMargin: 11
|
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"
|
leftComponentText: "1"
|
||||||
inputList: ListModel {
|
inputList: ListModel {
|
||||||
|
ListElement {
|
||||||
|
seedWord: "add"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
seedWord: "address"
|
||||||
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
seedWord: "panda"
|
seedWord: "panda"
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
seedWord: "posible"
|
seedWord: "posible"
|
||||||
}
|
}
|
||||||
|
ListElement {
|
||||||
|
seedWord: "win"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
seedWord: "wine"
|
||||||
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
seedWord: "wing"
|
seedWord: "wing"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property string insertedWord: ""
|
||||||
|
onDoneInsertingWord: insertedWord = word
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,6 @@ Item {
|
||||||
signal editClicked()
|
signal editClicked()
|
||||||
|
|
||||||
function setWord(word) {
|
function setWord(word) {
|
||||||
seedWordInput.ignoreTextChange = true
|
|
||||||
seedWordInput.input.edit.text = word
|
seedWordInput.input.edit.text = word
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,9 +109,8 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusInput {
|
StatusInput {
|
||||||
property bool ignoreTextChange: false
|
|
||||||
|
|
||||||
id: seedWordInput
|
id: seedWordInput
|
||||||
|
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
input.leftComponent: StatusBaseText {
|
input.leftComponent: StatusBaseText {
|
||||||
rightPadding: 6
|
rightPadding: 6
|
||||||
|
@ -123,10 +121,6 @@ Item {
|
||||||
}
|
}
|
||||||
input.acceptReturn: true
|
input.acceptReturn: true
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (ignoreTextChange) {
|
|
||||||
ignoreTextChange = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
filteredList.clear();
|
filteredList.clear();
|
||||||
let textToCheck = text.trim()
|
let textToCheck = text.trim()
|
||||||
if (textToCheck !== "") {
|
if (textToCheck !== "") {
|
||||||
|
|
Loading…
Reference in New Issue