@tdcerhverv/cvrlookup
v1.7.1
Published
Autocomplete for Company Name/CVR Lookup Component
Downloads
5
Maintainers
Keywords
Readme
CvrLookup component
This is an autocomplete CVR lookup component used for searching Companies.
Usage
Import like this:
import { CvrLookup } from '@tdcerhverv/cvrlookup';
Use like this:
<CvrLookup {...props}>{children}</CvrLookup>
Props
export interface ICvrLookupProps {
id: string;
labels?: ICvrLookupLabels;
exposedData?: 'lite' | 'full'; // not giving a value for this prop will render a component that points to a DEPRECATED endpoint; please try to always supply 'full' or 'lite'
onChange?: (value, payload) => void // `value` is the displayed label, `payload` is the { address, name, cvrNumber, pNumber }
onBlur?: (value: string) => void;
forceError?: boolean;
}
export interface ICvrLookupLabels {
label: string;
noResult: string;
errorLabel: string;
}
Tags
CVR, Company.