diff --git a/Sources/SwiftCrossUI/Views/Table.swift b/Sources/SwiftCrossUI/Views/Table.swift index 89bb29fa..2f5e436a 100644 --- a/Sources/SwiftCrossUI/Views/Table.swift +++ b/Sources/SwiftCrossUI/Views/Table.swift @@ -15,7 +15,7 @@ public struct Table: View { _ children: EmptyViewContent.Children, backend: Backend ) -> Backend.Widget { - return backend.createTable(rows: rows.count, columns: columns.count) + return backend.createTable(rows: rows.count + 1, columns: columns.count) } public func update( @@ -23,16 +23,25 @@ public struct Table: View { children: EmptyViewContent.Children, backend: Backend ) { - backend.setRowCount(ofTable: widget, to: rows.count) + backend.setRowCount(ofTable: widget, to: rows.count + 1) backend.setColumnCount(ofTable: widget, to: columns.count) - for i in 0..