Skip to content

Commit 7dfb59f

Browse files
committed
fix: use native .toolbar(.bottomBar) for pagination — system glass material
1 parent f49bf0d commit 7dfb59f

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

TableProMobile/TableProMobile/Views/DataBrowserView.swift

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,34 +97,35 @@ struct DataBrowserView: View {
9797
}
9898
}
9999
}
100-
.safeAreaInset(edge: .bottom) {
100+
.toolbar {
101101
if !rows.isEmpty {
102-
HStack {
102+
ToolbarItem(placement: .bottomBar) {
103103
Button {
104104
Task { await goToPreviousPage() }
105105
} label: {
106106
Image(systemName: "chevron.left")
107107
}
108108
.disabled(pagination.currentPage == 0 || isLoading)
109-
109+
}
110+
ToolbarItem(placement: .bottomBar) {
110111
Spacer()
111-
112+
}
113+
ToolbarItem(placement: .bottomBar) {
112114
Text(paginationLabel)
113115
.font(.footnote)
114116
.foregroundStyle(.secondary)
115-
117+
}
118+
ToolbarItem(placement: .bottomBar) {
116119
Spacer()
117-
120+
}
121+
ToolbarItem(placement: .bottomBar) {
118122
Button {
119123
Task { await goToNextPage() }
120124
} label: {
121125
Image(systemName: "chevron.right")
122126
}
123127
.disabled(!pagination.hasNextPage || isLoading)
124128
}
125-
.padding(.horizontal, 20)
126-
.padding(.vertical, 12)
127-
.background(.ultraThinMaterial)
128129
}
129130
}
130131
.task { await loadData(isInitial: true) }

0 commit comments

Comments
 (0)