Upload - uid is set even if provided - issue when fileList is immutable from ReduxToolkit selector | Cannot assign to read only property 'uid' of object '#<Object>' #29233
Labels
🐛 Bug
Ant Design Team had proved that this is a bug.
Reproduction link
Steps to reproduce
Check reproduction link - there is my explanation of the problem.
The problem exists because I am using ReduxToolkit and getting attachements from the store (I am setting uid property) but this object is frozen (I want only show attached attachements (read-only))
What is expected?
There is react effect to set uid on each file if not provided
file.uid = (_a = file.uid) !== null && _a !== void 0 ? _a : "__AUTO__".concat(timestamp, "_").concat(index, "__");
should be sth like this
What is actually happening?
Cannot assign to read only property 'uid' of object '#'
The text was updated successfully, but these errors were encountered: