fix: unable to load data from chinaRegion during the first configuation (#2089)

Close T-607
This commit is contained in:
katherinehhh 2023-06-21 16:00:39 +08:00 committed by GitHub
parent 64070b81b9
commit c240228a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,10 +2,9 @@ import { LoadingOutlined } from '@ant-design/icons';
import { ArrayField } from '@formily/core';
import { connect, mapProps, mapReadPretty, useField } from '@formily/react';
import { toArr } from '@formily/shared';
import { action } from '@formily/reactive';
import { Cascader as AntdCascader, Space } from 'antd';
import { isBoolean, omit } from 'lodash';
import React, { useState } from 'react';
import React from 'react';
import { useRequest } from '../../../api-client';
import { defaultFieldNames } from './defaultFieldNames';
import { ReadPretty } from './ReadPretty';
@ -64,7 +63,7 @@ export const Cascader = connect(
);
};
const handelDropDownVisible = (value) => {
if (value && !field.dataSource) {
if (value && !field.dataSource.length) {
run();
}
};