mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user