当前位置 : 主页 > 手机开发 > harmonyos >

前端项目实战贰佰柒拾捌react-admin+material ui-react-admin-admin中RadioButtonGroupInput之isLoading

来源:互联网 收集:自由互联 发布时间:2023-08-26
import { useGetList, RadioButtonGroupInput } from 'react-admin';const UserCountry = () = { const { data, isLoading } = useGetList('countries'); // data is an array of { id: 123, code: 'FR', name: 'France' } return ( RadioButtonGroupInput so


import { useGetList, RadioButtonGroupInput } from 'react-admin';

const UserCountry = () => {
    const { data, isLoading } = useGetList('countries');
    // data is an array of { id: 123, code: 'FR', name: 'France' }
    return (
        <RadioButtonGroupInput 
            source="country"
            choices={data}
            optionText="name"
            optionValue="code"
            isLoading={isLoading}
        />
    );
}

获取选项时候加载指示器

【文章原创作者:韩国高防服务器 http://www.558idc.com/krgf.html 网络转载请说明出处】
网友评论