Skip to content

Commit e1c5e2d

Browse files
committed
Merge branch 'main' of github.com:vormkracht10/filament-fields
2 parents cd05b95 + 9be3139 commit e1c5e2d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Concerns/CanMapDynamicFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private function resolveFormFields(mixed $record = null): array
110110
$customFields = $this->resolveCustomFields();
111111

112112
return $record->fields
113-
->map(fn($field) => $this->resolveFieldInput($field, $customFields, $record))
113+
->map(fn ($field) => $this->resolveFieldInput($field, $customFields, $record))
114114
->filter()
115115
->values()
116116
->all();
@@ -119,7 +119,7 @@ private function resolveFormFields(mixed $record = null): array
119119
private function resolveCustomFields(): Collection
120120
{
121121
return collect(Fields::getFields())
122-
->map(fn($fieldClass) => new $fieldClass);
122+
->map(fn ($fieldClass) => new $fieldClass);
123123
}
124124

125125
private function resolveFieldInput(Model $field, Collection $customFields, mixed $record = null): ?object

src/Fields/Text.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function getForm(): array
136136
->numeric()
137137
->minValue(0)
138138
->label(__('Step'))
139-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'numeric'),
139+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'numeric'),
140140
Forms\Components\Select::make('config.inputMode')
141141
->label(__('Input mode'))
142142
->options([
@@ -149,13 +149,13 @@ public function getForm(): array
149149
'email' => __('Email'),
150150
'url' => __('URL'),
151151
])
152-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'numeric'),
152+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'numeric'),
153153
Forms\Components\Toggle::make('config.revealable')
154154
->label(__('Revealable'))
155-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'password'),
155+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'password'),
156156
Forms\Components\TextInput::make('config.telRegex')
157157
->label(__('Telephone regex'))
158-
->visible(fn(Forms\Get $get): bool => $get('config.type') === 'tel'),
158+
->visible(fn (Forms\Get $get): bool => $get('config.type') === 'tel'),
159159
]),
160160
]),
161161
])->columnSpanFull(),

src/Filament/RelationManagers/FieldsRelationManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function form(Form $form): Form
4343
->required()
4444
->placeholder(__('Name'))
4545
->live(debounce: 250)
46-
->afterStateUpdated(fn(Set $set, ?string $state) => $set('slug', Str::slug($state))),
46+
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
4747

4848
TextInput::make('slug')
4949
->readonly(),
@@ -75,10 +75,10 @@ function () {
7575
]),
7676
Section::make('Configuration')
7777
->columns(3)
78-
->schema(fn(Get $get) => $this->getFieldTypeFormSchema(
78+
->schema(fn (Get $get) => $this->getFieldTypeFormSchema(
7979
$get('field_type')
8080
))
81-
->visible(fn(Get $get) => filled($get('field_type'))),
81+
->visible(fn (Get $get) => filled($get('field_type'))),
8282
]),
8383
]);
8484
}

0 commit comments

Comments
 (0)