fix: fix uiSchema undefined (#770)

This commit is contained in:
SemmyWong 2022-08-24 08:51:42 +08:00 committed by GitHub
parent 4453a90977
commit 13dd078079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ export const useExportAction = () => {
const { uiSchema, interface: fieldInterface } =
getCollectionJoinField(`${name}.${es.dataIndex.join('.')}`) ?? {};
es.enum = uiSchema?.enum?.map((e) => ({ value: e.value, label: e.label }));
if (!es.enum && uiSchema.type === 'boolean') {
if (!es.enum && uiSchema?.type === 'boolean') {
es.enum = [
{ value: true, label: t('Yes') },
{ value: false, label: t('No') },