
[英]REACT Todo-List : How to check if an item already exist in the array
[英]Check if Item Already Exist in Nested Array in React/Redux
我有一个可以上传一张或多张图片的图片上传。 每个产品可能包含一个或多个图像。 我的问题是当我尝试上传时,它应该首先检查图像是否已经存在。 我认为我们可以使用imageFileName
和/或productCode
进行检查?
请在此处检查我的代码和框单击此处
const browseFiles = (e) => {
if (!e) return;
const files = e.currentTarget.files;
onUploadImage(files);
e.target.value = null;
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.