Briefley
Briefley
FFilament
Created by Briefley on 4/16/2025 in #❓┊help
File Upload in forms disrupts the ongoing typing process in other inputs
3 replies
FFilament
Created by Briefley on 4/16/2025 in #❓┊help
File Upload in forms disrupts the ongoing typing process in other inputs
The code:
public static function getComponentSchema(string $locale): array
{
return [
static::getIdField(),
static::getStorageUrlField(),

FileUpload::make('image')
->label(__('imagetext.image.label'))
->openable()
->visibility('private')
->directory('public/theme-pages')
->live()
->afterStateUpdated(function ($state, Set $set) {
$set('storageUrl', Storage::url(''));
}),
// We might need to have badge types
TextInput::make('badge')
->label(__('imagetext.badge.label')),
TextInput::make('heading')
->label(__('imagetext.heading.label')),
TextInput::make('description')
->label(__('imagetext.description.label')),
Select::make('align')
->label(__('imagetext.align.label'))
->options([
'left' => __('imagetext.align.left.label'),
'right' => __('imagetext.align.right.label'),
])
->native(false),
Section::make('button')
->schema([
TextInput::make('button.label')
->label(__('imagetext.button.label.label')),
TextInput::make('button.href')
->label(__('imagetext.button.href.label')),
]),
];
}
public static function getComponentSchema(string $locale): array
{
return [
static::getIdField(),
static::getStorageUrlField(),

FileUpload::make('image')
->label(__('imagetext.image.label'))
->openable()
->visibility('private')
->directory('public/theme-pages')
->live()
->afterStateUpdated(function ($state, Set $set) {
$set('storageUrl', Storage::url(''));
}),
// We might need to have badge types
TextInput::make('badge')
->label(__('imagetext.badge.label')),
TextInput::make('heading')
->label(__('imagetext.heading.label')),
TextInput::make('description')
->label(__('imagetext.description.label')),
Select::make('align')
->label(__('imagetext.align.label'))
->options([
'left' => __('imagetext.align.left.label'),
'right' => __('imagetext.align.right.label'),
])
->native(false),
Section::make('button')
->schema([
TextInput::make('button.label')
->label(__('imagetext.button.label.label')),
TextInput::make('button.href')
->label(__('imagetext.button.href.label')),
]),
];
}
3 replies