Make sure field state is valid (#11921)

This commit is contained in:
melohagan 2023-09-28 16:09:13 +01:00 committed by GitHub
parent 6c9b3e33a3
commit 80d91cdd92
1 changed files with 6 additions and 1 deletions

View File

@ -121,7 +121,12 @@
if (!Array.isArray(values)) {
values = [values]
}
return values.map(value => (typeof value === "object" ? value._id : value))
values = values.map(value =>
typeof value === "object" ? value._id : value
)
// Make sure field state is valid
fieldApi.setValue(values)
return values
}
const getDisplayName = row => {