Skip to content

Commit

Permalink
Merge pull request #43 from chabose/master
Browse files Browse the repository at this point in the history
Fix for Issue #26
  • Loading branch information
karolkulesza committed Aug 5, 2020
2 parents a542e56 + d2c8311 commit 8565654
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Sources/QGrid/QGrid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ public struct QGrid<Data, Content>: View
public var body : some View {
GeometryReader { geometry in
Group {
if self.isScrollable {
ScrollView(showsIndicators: self.showScrollIndicators) {
self.content(using: geometry)
if !self.data.isEmpty {
if self.isScrollable {
ScrollView(showsIndicators: self.showScrollIndicators) {
self.content(using: geometry)
}
} else {
self.content(using: geometry)
}
}
} else {
self.content(using: geometry)
}
}
.padding(.horizontal, self.hPadding)
.padding(.vertical, self.vPadding)
Expand Down

0 comments on commit 8565654

Please sign in to comment.