Skip to content

Commit 037ed12

Browse files
authored
Add single setConfigurableArea (rappasoft#1706)
* Add setConfigurableArea * Update Workflows --------- Co-authored-by: lrljoe <[email protected]>
1 parent 020fec4 commit 037ed12

File tree

7 files changed

+53
-97
lines changed

7 files changed

+53
-97
lines changed

.github/workflows/run-tests-pcov-pull.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: run-tests-pcov-pull
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
branches:
6+
- 'develop'
7+
- 'master'
48

59
jobs:
610
test:
@@ -41,6 +45,13 @@ jobs:
4145
env:
4246
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4347

48+
- name: Cache extensions
49+
uses: actions/cache@v3
50+
with:
51+
path: ${{ steps.extcache.outputs.dir }}
52+
key: ${{ steps.extcache.outputs.key }}
53+
restore-keys: ${{ steps.extcache.outputs.key }}
54+
4455
- name: Setup problem matchers for PHP
4556
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
4657

.github/workflows/run-tests-pcov.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

.github/workflows/run-tests-pull.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: run-tests-pull
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
branches:
6+
- 'develop'
7+
- 'master'
48

59
jobs:
610
test:
@@ -10,8 +14,11 @@ jobs:
1014
matrix:
1115
os: [ubuntu-latest]
1216
php: [8.1, 8.2, 8.3]
13-
laravel: [10]
17+
laravel: [10.*,11.*]
1418
stability: [prefer-dist]
19+
exclude:
20+
- laravel: 11.*
21+
php: 8.1
1522

1623
name: STD-PULL - ${{ matrix.os }} - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
1724
env:

.github/workflows/run-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ jobs:
1010
matrix:
1111
os: [ubuntu-latest]
1212
php: [8.1, 8.2, 8.3]
13-
laravel: [10]
13+
laravel: [10.*,11.*]
1414
stability: [prefer-dist]
15+
exclude:
16+
- laravel: 11.*
17+
php: 8.1
1518

1619
name: STD-PUSH - ${{ matrix.os }} - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
1720
env:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to `laravel-livewire-tables` will be documented in this file
44

5+
## UNRELEASED
6+
### New Features
7+
- Add setConfigurableArea by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1706
8+
9+
### Tweaks
10+
- Adjust Workflow behaviour for PCOV by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1706
11+
512
## [v3.2.4] - 2024-03-01
613
### Bug Fixes
714
- Collapsing Columns fix when multiple tables are displayed on a page by @lrljoe

docs/datatable/configurable-areas.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ There are certain areas of the datatable as of `v2.3` where you can include your
77

88
## Available Methods
99

10+
### setConfigurableArea
11+
12+
You can use the `setConfigurableArea` method to set an area that you want to configure.
13+
14+
```php
15+
public function configure(): void
16+
{
17+
$this->setConfigurableArea('before-tools', 'path.to.my.view');
18+
}
19+
```
20+
1021
### setConfigurableAreas
1122

12-
You can use the `setConfigurableAreas` method to set the areas that you want to be configurable.
23+
You can use the `setConfigurableAreas` method to set multiple areas that you want to configure.
1324

1425
```php
1526
public function configure(): void

src/Traits/Configuration/ConfigurableAreasConfiguration.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ public function setConfigurableAreas(array $areas): self
1414
return $this;
1515
}
1616

17+
public function setConfigurableArea(string $configurableArea, mixed $config): self
18+
{
19+
if (array_key_exists($configurableArea, $this->configurableAreas)) {
20+
$this->configurableAreas[$configurableArea] = $config;
21+
}
22+
23+
return $this;
24+
}
25+
1726
public function setHideConfigurableAreasWhenReorderingStatus(bool $status): self
1827
{
1928
$this->hideConfigurableAreasWhenReorderingStatus = $status;

0 commit comments

Comments
 (0)