Skip to content

Commit 68bb602

Browse files
authored
Do not update value of cloned file inputs
The value of a file input can only be set to an empty string so we have to skip it.
1 parent ae50bb9 commit 68bb602

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SortableContainer/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
278278
]; // Convert NodeList to Array
279279

280280
clonedFields.forEach((field, index) => {
281-
return (field.value = fields[index] && fields[index].value);
281+
if (field.type !== 'file' && fields[index]) {
282+
field.value = fields[index].value;
283+
}
282284
});
283285

284286
this.helper = this.document.body.appendChild(clonedNode);

0 commit comments

Comments
 (0)