Skip to content

Commit 414ad82

Browse files
committed
Merge branch 'main' of github.com:vormkracht10/filament-fields
2 parents cb50e7c + cbf6c89 commit 414ad82

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/Concerns/HasFieldTypeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ protected function isValidFieldClass(?string $className): bool
4444
&& class_exists($className)
4545
&& method_exists($className, 'getForm');
4646
}
47-
}
47+
}

src/Filament/RelationManagers/FieldsRelationManager.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
namespace Vormkracht10\FilamentFields\Filament\RelationManagers;
44

5-
use Filament\Tables;
6-
use Filament\Forms\Get;
7-
use Filament\Forms\Set;
8-
use Livewire\Component;
9-
use Filament\Forms\Form;
10-
use Filament\Tables\Table;
11-
use Illuminate\Support\Str;
125
use Filament\Forms\Components\Grid;
13-
use Filament\Forms\Components\Select;
146
use Filament\Forms\Components\Section;
15-
use Illuminate\Database\Eloquent\Model;
7+
use Filament\Forms\Components\Select;
168
use Filament\Forms\Components\TextInput;
17-
use Vormkracht10\FilamentFields\Models\Field;
9+
use Filament\Forms\Form;
10+
use Filament\Forms\Get;
11+
use Filament\Forms\Set;
1812
use Filament\Resources\RelationManagers\RelationManager;
13+
use Filament\Tables;
14+
use Filament\Tables\Table;
15+
use Illuminate\Database\Eloquent\Model;
16+
use Illuminate\Support\Str;
17+
use Livewire\Component;
1918
use Vormkracht10\Fields\Facades\Fields;
20-
use Vormkracht10\FilamentFields\Concerns\HasFieldTypeResolver;
2119
use Vormkracht10\FilamentFields\Concerns\HasConfigurableFields;
20+
use Vormkracht10\FilamentFields\Concerns\HasFieldTypeResolver;
21+
use Vormkracht10\FilamentFields\Models\Field;
2222

2323
class FieldsRelationManager extends RelationManager
2424
{
@@ -42,7 +42,7 @@ public function form(Form $form): Form
4242
->required()
4343
->placeholder(__('Name'))
4444
->live(debounce: 250)
45-
->afterStateUpdated(fn(Set $set, ?string $state) => $set('slug', Str::slug($state))),
45+
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
4646

4747
TextInput::make('slug')
4848
->readonly(),
@@ -74,10 +74,10 @@ function () {
7474
]),
7575
Section::make('Configuration')
7676
->columns(3)
77-
->schema(fn(Get $get) => $this->getFieldTypeFormSchema(
77+
->schema(fn (Get $get) => $this->getFieldTypeFormSchema(
7878
$get('field_type')
7979
))
80-
->visible(fn(Get $get) => filled($get('field_type'))),
80+
->visible(fn (Get $get) => filled($get('field_type'))),
8181
]),
8282
]);
8383
}
@@ -161,7 +161,7 @@ public function table(Table $table): Table
161161
'model_key' => $this->ownerRecord->slug,
162162
];
163163
})
164-
->mutateFormDataUsing(fn(array $data, Model $record): array => $this->transferValuesOnSlugChange($data, $record))
164+
->mutateFormDataUsing(fn (array $data, Model $record): array => $this->transferValuesOnSlugChange($data, $record))
165165
->after(function (Component $livewire) {
166166
$livewire->dispatch('refreshFields');
167167
}),
@@ -224,4 +224,4 @@ private function transferValuesOnSlugChange(array $data, Model $record): array
224224

225225
return $data;
226226
}
227-
}
227+
}

0 commit comments

Comments
 (0)