Skip to content

Commit 9c7ef82

Browse files
author
crelies
committed
docs(readme): added new custom content view section, updated migration section
1 parent 641b433 commit 9c7ef82

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,27 @@ AdvancedList(yourData, listView: { rows in
6363
})
6464
```
6565

66+
### 🆕 Custom Content view
67+
68+
Starting from version `8.0.0` you have full freedom & control over the content view rendered in the `items` state of your `AdvancedList`. Use a `SwiftUI List` or a `custom view`.
69+
70+
Upgrade from version `7.0.0` **without breaking anything** and use the new API:
71+
72+
```swift
73+
AdvancedList(listState: yourListState, content: {
74+
VStack {
75+
Text("Row 1")
76+
Text("Row 2")
77+
Text("Row 3")
78+
}
79+
}, errorStateView: { error in
80+
VStack(alignment: .leading) {
81+
Text("Error").foregroundColor(.primary)
82+
Text(error.localizedDescription).foregroundColor(.secondary)
83+
}
84+
}, loadingStateView: ProgressView.init)
85+
```
86+
6687
### 📄 Pagination
6788

6889
The `Pagination` functionality is now (>= `5.0.0`) implemented as a `modifier`.
@@ -477,3 +498,8 @@ AdvancedList(yourData, content: { item in
477498
}, pagination: .noPagination)
478499
```
479500
</details>
501+
502+
<details>
503+
<summary>Migration 7.0 -> 8.0</summary>
504+
Nothing to do 🎉
505+
</details>

0 commit comments

Comments
 (0)