fix: add doctype, idx, parent, parenttype & parentfield in new grid row
This commit is contained in:
parent
29894ffcca
commit
727d0a9acd
@ -417,6 +417,8 @@ const addRow = () => {
|
|||||||
newRow.name = getRandom(10)
|
newRow.name = getRandom(10)
|
||||||
showRowList.value.push(false)
|
showRowList.value.push(false)
|
||||||
newRow['__islocal'] = true
|
newRow['__islocal'] = true
|
||||||
|
newRow['idx'] = rows.value.length + 1
|
||||||
|
newRow['doctype'] = props.doctype
|
||||||
rows.value.push(newRow)
|
rows.value.push(newRow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -162,6 +162,10 @@ export function getScript(doctype, view = 'Form') {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
row.parent = row.parent || data.name
|
||||||
|
row.parentype = row.parenttype || data.doctype
|
||||||
|
row.parentfield = row.parentfield || parentField
|
||||||
|
|
||||||
return createDocProxy(row, instance)
|
return createDocProxy(row, instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user