Skip to content

Commit 81d72dd

Browse files
authored
Update the docs to reflect the ->supports() method
1 parent 2b05169 commit 81d72dd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/docs/SDK/10-creating-dataviews.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
To create a `DataView` you need to call any of the named constructors available:
44

55
- `DataView::table()` - Creates a DataView with a `table` view type.
6-
- `DataView::list()` - (Not available yet) Creates a DataView with a `list` view type.
7-
- `DataView::grid()` - (Not available yet) Creates a DataView with a `grid` view type.
6+
- `DataView::list()` - Creates a DataView with a `list` view type.
7+
- `DataView::grid()` - Creates a DataView with a `grid` view type.
8+
9+
The view type used will be the default view type, but you can add support for other view types by declaring the other view types that are supported:
10+
11+
```php
12+
$dataview = DataView::table( ... )->supports( View::Grid(), View::List() );
13+
```
14+
15+
The order in which support is added is the order that the view types will appear in the view type switcher.
816

917
:::note
1018

0 commit comments

Comments
 (0)