答案 0 :(得分:1)
您可以通过使用prevState过滤setState来解决此问题
let actionRemoveDocs = (cell, event) => {
event.preventDefault();
// console.log(inputArrDocuments.filter(docs => docs.documentUuid !== cell))
setTimeout(() => {
setInputArrDocuments(prev =>
prev.filter(docs => docs.documentArray !== cell)
);
}, 500);};