Skip to content

Commit

Permalink
Merge branch 'dev-2024/0119-edit-subtable' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoBingyu committed Jan 23, 2024
2 parents 8d103cd + a19c2c3 commit ae7c018
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ function AssociatedRecordsConfig({ initialValue, onChange }: Props): JSX.Element
actions.setFieldState('filterConfig', (state) => {
state.props['x-component-props'] = { appID, tableID: value.tableID, currentFormSchema: schema };
});

if (value?.appID !== initialValue?.linkedTable?.appID ||
value?.tableID !== initialValue?.linkedTable?.tableID) {
actions.setFieldState('associativeConfig', (state: any) => {
if (state.props['x-component-props']?.associativeRules) {
state.props['x-component-props'].associativeRules = [];
}
state.value = null;
});
actions.setFieldState('filterConfig', (state) => {
state.value = null;
});
}
});
onFieldValueChange$('linkedTable').subscribe(({ value }) => {
if (value?.appID !== initialValue?.linkedTable?.appID ||
Expand Down

0 comments on commit ae7c018

Please sign in to comment.