Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sourceData或者targetData重新赋值不生效? #60

Open
authoritya opened this issue Apr 9, 2024 · 0 comments
Open

sourceData或者targetData重新赋值不生效? #60

authoritya opened this issue Apr 9, 2024 · 0 comments

Comments

@authoritya
Copy link

//外部调用方法手动赋值
const fn = async() => {
const [sourceData, targetData] = await Promise.all([
DataApi.listObjDataV3(originMeta ? originMeta.obj.obj.ns : sourceObjData.ns, mainData ? mainData.biz_data_obj_name :
objMainData.biz_data_obj_name, {...payload, filters: sourceFilter}),
DataApi.listObjDataV3(originMeta ? originMeta.obj.obj.ns : sourceObjData.ns, mainData ? mainData.standard_name :
objMainData.standard_name, {...payload, filters: targetFilter}),
])

setDataSource(sourceData.obj.data ?? [])
setDataTarget(targetData.obj.data ?? [])
}

<ButterflyDataMapping
width={'100%'}
type={'single'}
sourceColumns={columnsSource}
targetColumns={columnsTarget}
sourceData={{fields: dataSource}}
targetData={{fields: dataTarget}}
mappingData={mappingData}
sourceClassName={'source-column'}
targetClassName={'target-column'}
onRowMouseOver={onRowMouseOver}
onRowMouseOut={onRowMouseOut}
onEdgeClick={onEdgeClick}
config={{checkable: {source: true}}}
onChange={onMapFieldsChange}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant