Skip to content

Commit

Permalink
reflectTableModel: Forward RowsChanged events
Browse files Browse the repository at this point in the history
  • Loading branch information
lxn committed Nov 13, 2019
1 parent 5b8dc40 commit bf589de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reflectmodels.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ func newReflectTableModel(dataSource interface{}) (TableModel, error) {
}
})

rtm.RowsChanged().Attach(func(from, to int) {
m.PublishRowsChanged(from, to)
})

rtm.RowsInserted().Attach(func(from, to int) {
m.items = rtm.Items()
m.value = reflect.ValueOf(m.items)
Expand Down

0 comments on commit bf589de

Please sign in to comment.