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
18 changes: 18 additions & 0 deletions docs/datatable/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,21 @@ public function configure(): void
]);
}
```

### Vertical Scrolling Example
Should you wish to implement a table with a responsive height, and vertical scrolling for additional rows, a basic example is below that demonstrates the approach, noting that you will likely wish to adjust the break-points!

```php
public function configure(): void
{

$this->setTableWrapperAttributes([
'class' => 'max-h-56 md:max-h-72 lg:max-h-96 overflow-y-scroll',
]);
$this->setTheadAttributes([
'class' => 'sticky top-0 '
]);
}
```

Keep in mind that you must only call methods from configure() once to avoid overriding or conflicting results.
Loading