filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.44k stars 2.73k forks source link

Simple Repeater with FileUpload #13636

Open sglkc opened 1 month ago

sglkc commented 1 month ago

Package

filament/filament

Package Version

v3.2.95

Laravel Version

v11.16.0

Livewire Version

v3.5.4

PHP Version

8.3.9

Problem description

I wanted to make a multiple image upload, but multiple() alone consumes too much vertical space. So I tried to use a simple Repeater instead, since it returns an array of filenames.

Uploading works, but it's currently impossible (?) to view uploaded files in a Repeater using simple() in edit/view form. Tried to map the array before filling, error is the same as #12076

Expected behavior

Replacing simple with schema works as expected.

image

Steps to reproduce

  1. Make a Repeater->simple(FileUpload)

  2. Upload something image

  3. Edit page opened and throws error image

Reproduction repository (issue will be closed if this is not valid)

https://github.com/sglkc/filament-issues/tree/fileupload-repeater

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

petrisorcraciun commented 1 month ago

maybe it's helpful; use multiple and panelLayout