fix: multiple = false

This commit is contained in:
chenos 2022-10-16 16:06:44 +08:00
parent 347c0831f8
commit 8e087840ca
2 changed files with 5 additions and 1 deletions

View File

@ -436,7 +436,7 @@ export const obo: IField = {
'x-component': 'RecordPicker',
'x-component-props': {
// mode: 'tags',
multiple: true,
multiple: false,
fieldNames: {
label: 'id',
value: 'id',

View File

@ -258,6 +258,10 @@ export async function updateSingleAssociation(
return false;
}
if (Array.isArray(value)) {
throw new Error(`The value of '${key}' cannot be in array format`);
}
const { context, updateAssociationValues = [], transaction } = options;
const keys = getKeysByPrefix(updateAssociationValues, key);