Skip to content

Commit c81ff3f

Browse files
Merge pull request #59 from CodeWithDennis/add-prefix-suffix-action-s
Add `HasAffixActions`
2 parents eed2f08 + f7c8a2a commit c81ff3f

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,17 +5,20 @@
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;
21+
use HasActions;
1922
use HasAffixes;
2023
use HasPlaceholder;
2124

0 commit comments

Comments
 (0)