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