payload icon indicating copy to clipboard operation
payload copied to clipboard

Uploads: HasMany only shows 10 selected items, even if more are selected

Open tyteen4a03 opened this issue 1 year ago • 1 comments

Link to reproduction

No response

Payload Version

3.0.0.beta-90

Node Version

20.12.2

Next.js Version

15.0.0-canary.107

Describe the Bug

The HasMany Upload Field only shows 10 selected items, even if more are selected.

Reproduction Steps

  1. Upload more than 10 media.
  2. In an upload field with hasMany: true, select 10 media. Remember the order.
  3. Add another media. The list will now show the first media chosen, and the last 9 media chosen, with the 2nd media disappearing from the list.
  4. Deleting from any of the last 9 media chosen and the 2nd media reappears.

Adapters and Plugins

No response

tyteen4a03 avatar Aug 22 '24 20:08 tyteen4a03

I had a further look, might be as simple as adding a limit: 0 at https://github.com/payloadcms/payload/commit/d2571e10d6820955b7a53b815c787f2d64f0226e#diff-337f75fe427adeaed30da627f81d6cf870d70022d5b8045a93d31d8d7dc302f8R89 but I'm a bit scared of touching it since there's no tests covering UploadMulti.

tyteen4a03 avatar Aug 22 '24 21:08 tyteen4a03

I've run into this bug as well. To add to that I only see the list populated whenever I have saved the collection so thought it was broken all together at first. I'll have to retest with your specific next version if the issue lies there...

mhjmaas avatar Aug 26 '24 12:08 mhjmaas

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Sep 06 '24 20:09 github-actions[bot]