Skip to content

Commit

Permalink
Add Vertical Scrolling Example
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Sep 4, 2024
1 parent a63fb44 commit b5e9dd0
Showing 1 changed file with 18 additions and 0 deletions.
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.

0 comments on commit b5e9dd0

Please sign in to comment.