Closed Mahoo12138 closed 1 year ago
https://github.com/open-hand/choerodon-ui/blob/e0f2c94ccdfe1776c127c5d6a6f9f59706d630a1/components-dataset/data-set/DataSet.tsx#L2843-L2867
Look the tenth line of bind(...) function above, name is used as the key for the children of parent dataset, but the code comment show that name is the name of the parent dataset, it's illogical.
bind(...)
name
And we can presume from syncChild that name should be the name of the child dataset: https://github.com/open-hand/choerodon-ui/blob/e0f2c94ccdfe1776c127c5d6a6f9f59706d630a1/components-dataset/data-set/DataSet.tsx#L3438-L3444
syncChild
ds.children[name] = this; this.parent = ds; this.parentName = name;
https://github.com/open-hand/choerodon-ui/blob/e0f2c94ccdfe1776c127c5d6a6f9f59706d630a1/components-dataset/data-set/DataSet.tsx#L2843-L2867
Look the tenth line of
bind(...)
function above,name
is used as the key for the children of parent dataset, but the code comment show thatname
is the name of the parent dataset, it's illogical.And we can presume from
syncChild
thatname
should be the name of the child dataset: https://github.com/open-hand/choerodon-ui/blob/e0f2c94ccdfe1776c127c5d6a6f9f59706d630a1/components-dataset/data-set/DataSet.tsx#L3438-L3444