/** @format */

import * as React from 'react';
import Select from './select';
import {useErrorCodeList} from '../../service/errorCode';

export default React.forwardRef((props, ref) => {
    const [codeState, requestCode] = useErrorCodeList();
    return (
        <Select
            ref={ref}
            allowClear
            showSearch
            placeholder="请选择错误码"
            options={codeState.dataSource}
            loading={codeState.loading}
            {...props}
        />
    );
});
