Skip to content

Commit

Permalink
Merge pull request #21 from awcodes/feat/sort-config
Browse files Browse the repository at this point in the history
better config name and readme updates
  • Loading branch information
awcodes authored Jun 23, 2023
2 parents eb8528e + 3c8040a commit 2fd2617
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Converted counts will also have a tooltip that displays the full count. This can

You can also control the number of columns the grid will use at each breakpoint. You can set a breakpoint to null to disable it.

All resources will be sorted alphabetically, should you choose to disable this, you can set `disable_sorting` to true. Doing so will honor the order of included resources or Filament's default order for registered resources.

```php
return [
'includes' => [
Expand All @@ -65,6 +67,7 @@ return [
'2xl' => null,
],
'disable_css' => false,
'disable_sorting' => false,
];
```

Expand Down
2 changes: 1 addition & 1 deletion config/overlook.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
'2xl' => null,
],
'disable_css' => false,
'sort' => false,
'disable_sorting' => false,
];
2 changes: 1 addition & 1 deletion src/Overlook.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getData(): array
return null;
})
->filter()
->when(config('overlook.sort'), function ($collection) {
->when(! config('overlook.disable_sorting'), function ($collection) {
return $collection->sortBy('name');
})
->values()
Expand Down

0 comments on commit 2fd2617

Please sign in to comment.