Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions resources/views/docs/mobile/4/edge-components/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Pair with [`<native:list-item>`](#list-item) for Material3 list rows, or use any
plain section headers instead (optional, boolean, default: `false`)
- `on-refresh` - Component method called on pull-to-refresh (optional, string) [iOS]
- `on-end-reached` - Component method called when the user nears the end of the list (optional, string)
- `end-reached-buffer` <x-docs.version-badge package="mobile-ui" since="0.7" /> - Number of items from the end at which `on-end-reached` is triggered (optional, integer, default: `3`)


## Children

Expand Down Expand Up @@ -248,12 +250,17 @@ here just gives the demo enough rows to scroll before the end-reached trigger fi

@verbatim
```blade
<native:list on-end-reached="loadMore">
<native:list
on-end-reached="loadMore"
:end-reached-buffer="5"
>
@foreach (range(1, 15) as $i)
<native:list-item headline="Post {{ $i }}" supporting="Keep scrolling — loadMore() fires near the end" />
@endforeach
</native:list>
```

A buffer of `5` triggers `loadMore()` when the list is within five items of the end. When omitted, the buffer defaults to `3`.
@endverbatim

## Element
Expand All @@ -268,7 +275,8 @@ NativeList::make(
)
->separator()
->onRefresh('refresh')
->onEndReached('loadMore');
->onEndReached('loadMore')
->endReachedBuffer(5);
```

### `NativeList` methods
Expand All @@ -279,6 +287,7 @@ NativeList::make(
- `separator(bool $value = true)` - Render dividers between rows
- `onRefresh(string $method)` - Pull-to-refresh handler
- `onEndReached(string $method)` - End-reached handler
- `endReachedBuffer(int $items)` - Number of items from the end at which the end-reached handler is triggered (default: `3`)

### `ListItem` methods

Expand Down