Skip to content

Commit 7aa4268

Browse files
authored
Adjust Methods - useComputedProperties (rappasoft#1873)
* Adjust Methods - useComputedProperties * Adjust ActionTest
1 parent 46d2752 commit 7aa4268

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

docs/misc/actions.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ Actions is a beta feature, that allows for the creation of Action Buttons that a
77

88
This is NOT recommended for production use at this point in time.
99

10-
## Usage
11-
To use "Actions", while it is in beta, you must include the following Trait in your table:
12-
```php
13-
use Rappasoft\LaravelLivewireTables\Traits\WithActions;
14-
```
15-
16-
Once out of beta, this will not be required.
17-
1810
## Component Available Methods
1911
### setActionWrapperAttributes
2012

src/Traits/ComponentUtilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ trait ComponentUtilities
4545

4646
protected array $extraWithAvgs = [];
4747

48-
protected bool $useComputedProperties = false;
48+
protected bool $useComputedProperties = true;
4949

5050
/**
5151
* Set any configuration options

src/Traits/HasAllTraits.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait HasAllTraits
88
use WithTableHooks;
99
use WithLoadingPlaceholder;
1010
use ComponentUtilities,
11-
//WithActions,
11+
WithActions,
1212
WithData,
1313
WithColumns,
1414
WithSorting,

src/Traits/WithSorting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait WithSorting
3131

3232
public string $defaultSortingLabelDesc = 'Z-A';
3333

34-
protected function queryStringWithSorting(): array
34+
public function queryStringWithSorting(): array
3535
{
3636
if ($this->queryStringIsEnabled() && $this->sortingIsEnabled()) {
3737
return [

tests/Views/Actions/ActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public function test_can_check_has_actions(): void
267267
{
268268
use \Rappasoft\LaravelLivewireTables\Traits\WithActions;
269269

270-
public function actions()
270+
public function actions(): array
271271
{
272272
return [
273273
\Rappasoft\LaravelLivewireTables\Views\Actions\Action::make('Test Edit 1')

0 commit comments

Comments
 (0)