Skip to content

Commit 0ab0281

Browse files
authored
Merge pull request #18 from inamiy/Forms/List-ViewBuilder
[Forms] Add `@ViewBuilder` in List components
2 parents 0599432 + e6a5458 commit 0ab0281

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/SherlockForms/List/NestedList.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extension SherlockView
1111
public func nestedList<Data, ID, RowContent>(
1212
data: Data,
1313
id: KeyPath<Data.Element, ID>,
14-
rowContent: @escaping (Data.Element) -> RowContent
14+
@ViewBuilder rowContent: @escaping (Data.Element) -> RowContent
1515
) -> some View
1616
where
1717
Data: MutableCollection & RangeReplaceableCollection,
@@ -31,7 +31,7 @@ extension SherlockView
3131
@ViewBuilder
3232
public func nestedList<Data, RowContent>(
3333
data: Data,
34-
rowContent: @escaping (Data.Element) -> RowContent
34+
@ViewBuilder rowContent: @escaping (Data.Element) -> RowContent
3535
) -> some View
3636
where
3737
Data: MutableCollection & RangeReplaceableCollection,
@@ -70,7 +70,7 @@ where
7070
data: Data,
7171
id: KeyPath<Data.Element, ID>,
7272
canShowCell: @MainActor @escaping (_ keywords: [String]) -> Bool,
73-
rowContent: @escaping (Data.Element) -> RowContent
73+
@ViewBuilder rowContent: @escaping (Data.Element) -> RowContent
7474
)
7575
{
7676
self.data = data

Sources/SherlockForms/List/SimpleList.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extension SherlockView
99
public func simpleList<Data, ID, RowContent>(
1010
data: Data,
1111
id: KeyPath<Data.Element, ID>,
12-
rowContent: @escaping (Data.Element) -> RowContent
12+
@ViewBuilder rowContent: @escaping (Data.Element) -> RowContent
1313
) -> some View
1414
where
1515
Data: MutableCollection & RangeReplaceableCollection,
@@ -29,7 +29,7 @@ extension SherlockView
2929
@ViewBuilder
3030
public func simpleList<Data, RowContent>(
3131
data: Data,
32-
rowContent: @escaping (Data.Element) -> RowContent
32+
@ViewBuilder rowContent: @escaping (Data.Element) -> RowContent
3333
) -> some View
3434
where
3535
Data: MutableCollection & RangeReplaceableCollection,
@@ -68,7 +68,7 @@ where
6868
data: Data,
6969
id: KeyPath<Data.Element, ID>,
7070
canShowCell: @MainActor @escaping (_ keywords: [String]) -> Bool,
71-
rowContent: @escaping (Data.Element) -> RowContent
71+
@ViewBuilder rowContent: @escaping (Data.Element) -> RowContent
7272
)
7373
{
7474
self.data = data

0 commit comments

Comments
 (0)