Skip to content

Commit a9d65c8

Browse files
committed
Additional adjustments
1 parent 8efc761 commit a9d65c8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
run: composer show -D
5050

5151
- name: Execute tests
52-
run: vendor/bin/pest --ci --bail --compact --memory --coverage --parallel
52+
run: vendor/bin/pest --ci --bail --compact --memory --coverage

src/DescribeFilamentResourceTool.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ public function mapTableFilter(BaseFilter $filter): array
281281
$baseInfo['usage'] = 'Please use the form schema to filter the data.';
282282
$baseInfo['type'] = 'form';
283283
$baseInfo['form'] = collect($filter->getFormSchema())
284+
->reject(fn (Component $component) => $component instanceof Grid || $component instanceof Fieldset)
284285
->map(fn (Component $component) => $this->mapFormComponent($component))
286+
->filter()
287+
->values()
285288
->all();
286289
}
287290

src/GetFilamentResourceDataTool.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function build(): PrismTool
3232
try {
3333
$listPageClass = $resource::getPages()['index'];
3434
$component = $listPageClass->getPage();
35+
36+
/** @var InteractsWithTable $listPage */
3537
$listPage = new $component;
3638
$listPage->bootedInteractsWithTable();
3739
$table = $listPage->getTable();
@@ -44,6 +46,8 @@ public function build(): PrismTool
4446
$listPage->tableSearch = $filters[$column->getName()];
4547
});
4648

49+
$listPage->resetTableFiltersForm();
50+
4751
foreach ($listPage->getTable()->getFilters() as $filter) {
4852
if (method_exists($filter, 'isMultiple') && $filter->isMultiple()) {
4953
$listPage->tableFilters[$filter->getName()] = [
@@ -65,8 +69,6 @@ public function build(): PrismTool
6569
}
6670
}
6771

68-
dump($listPage->tableFilters, $filters);
69-
7072
// TODO: Allow the tool to specify the number of results to return with a max
7173
$results = $listPage->getFilteredTableQuery()->take(10)->get();
7274

0 commit comments

Comments
 (0)