Skip to content

Commit 5aad2bc

Browse files
Add HasAffixActions
1 parent eed2f08 commit 5aad2bc

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

resources/views/select-tree.blade.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
$suffixLabel = $getSuffixLabel();
44
$prefixIcon = $getPrefixIcon();
55
$suffixIcon = $getSuffixIcon();
6+
$prefixActions = $getPrefixActions();
7+
$suffixActions = $getSuffixActions();
68
@endphp
79

810
<x-dynamic-component :component="$getFieldWrapperView()" :field="$field">
@@ -47,6 +49,8 @@
4749
:prefix-icon="$prefixIcon"
4850
:suffix-icon="$suffixIcon"
4951
:disabled="$isDisabled()"
52+
:prefix-actions="$prefixActions"
53+
:suffix-actions="$suffixActions"
5054
>
5155
<div x-ref="tree"></div>
5256
</x-filament::input.wrapper>

src/SelectTree.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@
55
use Closure;
66
use Filament\Forms\Components\Concerns\CanBeDisabled;
77
use Filament\Forms\Components\Concerns\CanBeSearchable;
8+
use Filament\Forms\Components\Concerns\HasActions;
89
use Filament\Forms\Components\Concerns\HasAffixes;
910
use Filament\Forms\Components\Concerns\HasPlaceholder;
11+
use Filament\Forms\Components\Contracts\HasAffixActions;
1012
use Filament\Forms\Components\Field;
1113
use Illuminate\Database\Eloquent\Relations\BelongsTo;
1214
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
1315
use Illuminate\Support\Collection;
1416

15-
class SelectTree extends Field
17+
class SelectTree extends Field implements HasAffixActions
1618
{
1719
use CanBeDisabled;
1820
use CanBeSearchable;
1921
use HasAffixes;
2022
use HasPlaceholder;
23+
use HasActions;
2124

2225
protected string $view = 'select-tree::select-tree';
2326

0 commit comments

Comments
 (0)