shisui#00000
shisui#00000
FFilament
Created by rg.block on 8/3/2023 in #❓┊help
FileUpload on edit page
Having taken another stab, I see that the FileUpload in the repeater works perfectly when not collapsed. However, if ->collapsed() is initially set, it goes into that buggy mode
35 replies
FFilament
Created by rg.block on 8/3/2023 in #❓┊help
FileUpload on edit page
Here's a code snippet that creates the repeater images for ref: public static function getRandomImageSchema(array $options = []): array { return [ Hidden::make('id'), TextInput::make('label') ->maxLength(70) ->default(null) ->disabled($options['disabled'] ?? false) ->required(), Repeater::make('images') ->disabled($options['disabled'] ?? false) ->collapsed() ->itemLabel(function ($uuid, $component) { $keys = array_keys($component->getState()); $index = array_search($uuid, $keys); return "Image " . $index + 1; }) ->addActionLabel('Add another image') ->maxItems(4) ->schema([ TextInput::make('name') ->label('image name') ->maxLength(100) ->required(), FileUpload::make('background_image_url') ->label('Square thumbnail') ->label('logo') ->disk('s3') ->image() ->imageEditorViewportWidth(428) ->imageEditorViewportHeight(172) ->reorderable() ->appendFiles() ->maxSize(51200) ->panelLayout('integrated') ->directory('media/images') ->visibility('publico') ->uploadProgressIndicatorPosition('left') ->reactive(), TextInput::make('background_image_alt_text') ->label('Image alt text') ->maxLength(50) ->required() ->visible(fn($get) => !empty($get('background_image_url'))), ]), ]; }
35 replies
FFilament
Created by rg.block on 8/3/2023 in #❓┊help
FileUpload on edit page
No description
35 replies