feat(GenericListView): reinitialize on model reset and handle delayed roles initialization
This commit is contained in:
parent
684fb787a6
commit
fc5daf2ee2
|
@ -53,6 +53,19 @@ ListView {
|
||||||
Component.onCompleted: initialize()
|
Component.onCompleted: initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: root.model
|
||||||
|
|
||||||
|
function onRowsInserted() {
|
||||||
|
if (rowModel.count === 0)
|
||||||
|
rowModel.initialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
function onModelReset() {
|
||||||
|
rowModel.initialize()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
border.color: "lightgray"
|
border.color: "lightgray"
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
Loading…
Reference in New Issue