Refactor: Remove maxVisibleRows from List and Table (not in SwiftUI API)

List and Table now always fill available height like SwiftUI.
The TUI-specific maxVisibleRows parameter was removed for API parity.
This commit is contained in:
phranck
2026-02-10 12:46:09 +01:00
parent e2acc069fc
commit 0dedddca59
5 changed files with 41 additions and 55 deletions
+2 -4
View File
@@ -51,8 +51,7 @@ struct ListPage: View {
HStack(spacing: 2) {
List(
"Single Selection",
selection: $singleSelection,
maxVisibleRows: 6
selection: $singleSelection
) {
ForEach(FileItem.sampleFiles) { file in
HStack(spacing: 1) {
@@ -64,8 +63,7 @@ struct ListPage: View {
List(
"Multi Selection",
selection: $multiSelection,
maxVisibleRows: 6
selection: $multiSelection
) {
ForEach(FileItem.sampleFiles) { file in
HStack(spacing: 1) {
+2 -4
View File
@@ -54,8 +54,7 @@ struct TablePage: View {
.foregroundStyle(.palette.foregroundSecondary)
Table(
FileEntry.sampleFiles,
selection: $singleSelection,
maxVisibleRows: 6
selection: $singleSelection
) {
TableColumn("Name", value: \FileEntry.name)
TableColumn("Size", value: \FileEntry.size)
@@ -71,8 +70,7 @@ struct TablePage: View {
.foregroundStyle(.palette.foregroundSecondary)
Table(
FileEntry.sampleFiles,
selection: $multiSelection,
maxVisibleRows: 4
selection: $multiSelection
) {
TableColumn("Name", value: \FileEntry.name)
TableColumn("Type", value: \FileEntry.type)