awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
324 stars 86 forks source link

CuratorPicker Multiple Selection on Single Relationship #463

Open iRaziul opened 6 months ago

iRaziul commented 6 months ago

Filament Version

v3.2.61

Plugin Version

v3.5.2

PHP Version

8.3

Problem description

While using the CuratorPicker with single relation we can select multiple images while uploading and all of them are selected after upload. Then clicking on the insert button all the images are selected to the field. (which is the issue)

We need to prevent auto-selection of multiple files while uploading files on CuratorPicker unless multiple are allowed.

You can understand better through this video (audio included and sorry for my broken English):

https://github.com/awcodes/filament-curator/assets/51883557/62f24558-c4bf-47ce-abf8-c16f56f3d19a

Expected behavior

If not multiple then only 1 file is allowed for selection.

Steps to reproduce

Shown in the video

Reproduction repository

No response

Relevant log output

No response

awcodes commented 6 months ago

Thanks for the thorough explanation and the video. Will look in to this soon.

iRaziul commented 6 months ago

Thanks for the thorough explanation and the video. Will look in to this soon.

Thanks for your response, Currently using maxItems(1) to prevent form submission 😌