Reactjs 删除或禁用动态表单add row React JS 17.0.1中前几行中选择的值

Reactjs 删除或禁用动态表单add row React JS 17.0.1中前几行中选择的值,reactjs,Reactjs,我有一个表单,它有一个添加更多按钮。单击它后,它将向表单中添加新行 const [row, setRow] = useState([ { index: Math.floor(Math.random() * 10000) + 1, budgetedQty: "", quantity: "", remainingQty: "", scheduleThreeAmount: "", payableTo

我有一个表单,它有一个
添加更多
按钮。单击它后,它将向表单中添加新行

const [row, setRow] = useState([
{
  index: Math.floor(Math.random() * 10000) + 1,
  budgetedQty: "",
  quantity: "",
  remainingQty: "",
  scheduleThreeAmount: "",
  payableTo: "",
  budgetedCost: [],
  amountForQuantity: [],
  remarks: "",
  costJson: [] 
}]);
以下是处理
添加更多
的代码:

const handleaddmoreSchedules = () => {
setRow([...row, {
  index: Math.floor(Math.random() * 10000) + 1,
  quantity: "",
  budgetedQty: "",
  remainingQty: "",
  scheduleThreeAmount: "",
  payableTo: "",
  budgetedCost: [],
  amountForQuantity: [],
  remarks: "",
  costJson: []
}]);
}
这是我正在使用的表格

<Form.Control required as="select" value={x.scheduleNo} name="scheduleNo" onChange={e => {handleInputChange(e, i); setSelectedScheduleNumber(e, i); handleQtyUpdate(e, i); setScheduleTypeChange(e)}} >
<option>Please select</option>
{projectScheduleNumber?.map((scRefNumber) => {
return (
<option id={scRefNumber["Schedule No"]}>{scRefNumber["Schedule No"]}</option>
);
})}
</Form.Control>
{handleInputChange(e,i);setSelectedScheduleNumber(e,i);handleQtyUpdate(e,i);setScheduleTypeChange(e)}>
请选择
{projectScheduleNumber?.map((参考编号)=>{
返回(
{scRefNumber[“附表编号”]}
);
})}
第一行显示所有可用选项。单击“添加更多”时,如何删除以前选择的选项值

多谢各位