feat(GenericListView): reinitialize on model reset and handle delayed roles initialization

This commit is contained in:
Michał Cieślak 2024-03-29 00:02:50 +01:00 committed by Michał
parent 684fb787a6
commit fc5daf2ee2
1 changed files with 13 additions and 0 deletions

View File

@ -53,6 +53,19 @@ ListView {
Component.onCompleted: initialize()
}
Connections {
target: root.model
function onRowsInserted() {
if (rowModel.count === 0)
rowModel.initialize()
}
function onModelReset() {
rowModel.initialize()
}
}
Rectangle {
border.color: "lightgray"
color: "transparent"