import React from 'react';
import Search from '../../extra/dataEntry/textSelect';
import { approvalBusinessData } from '../../../../services/globalSearchApi';
export default function(props) {
    const onChange = (...arg) => {
        props.onChange && props.onChange(...arg);
    };
    return (
        <div>
            <Search
                request={(val) => approvalBusinessData({ name: val, fieldValueName: props.type })}
                fieldNames={{ value: 'fieldValueValue', label: 'fieldValueName' }}
                {...props}
                onChange={onChange}
            ></Search>
        </div>
    );
}
