kendo-react icon indicating copy to clipboard operation
kendo-react copied to clipboard

[Bug][Upload] With multiple upload items have identical ids

Open WissamProgress opened this issue 1 year ago • 0 comments

I'm submitting a...

  • Bug report

Current behavior

When setting the multiple and batch props to true, the items have identical ids.

Expected behavior

The ids should be unique

Minimal reproduction of the problem with instructions

  1. Set the batch and multiple props to true
  2. Handle any of the these events: onAdd onRemove onProgress onStatusChange saveUrl
  3. Upload two or more files to the component
  4. Inspect the files that are passed as props to the events

Can be tested here - https://codesandbox.io/p/sandbox/aged-resonance-4f7c78?file=%2Fapp%2Fmain.jsx%3A12%2C29

Workaround

Generate the ids manually

import { guid } from '@progress/kendo-react-common';
const newfiles = files;
  newfiles.map((f) => {
  f.uid = guid();
});

Ticket ID: 1650737

WissamProgress avatar May 03 '24 11:05 WissamProgress