0👍
✅
You only have 1 unit in your units array. Try setting your units like this.
data (props) {
const form = reactive ({
invoice_code: props.invoice.invoice_code,
customer_name: props.invoice.customer_name,
units: units: props.invoice.units,
})
function update () {
Inertia.put(`/invoice/`+ props.invoice.id, form)
}
return { form, update }
},
props: {
invoice: Object,
},
}
Source:stackexchange.com