@engie-group/fluid-design-system-react
Version:
Fluid Design System React
70 lines (69 loc) • 1.61 kB
TypeScript
import React from 'react';
/**
* @deprecated GroupSelect component is deprecated, please use FormItem component with native html <select></select> as child
*/
export declare const NJGroupSelect: React.FC<IGroupSelectProps>;
export interface IGroupSelectProps {
/**
* Select id
*/
id?: string;
/**
* Select name
*/
name?: string;
/**
* Select label
*/
label?: string;
/**
* Select data
*/
data?: {
label: string;
options: {
value?: string;
label: string;
disabled?: boolean;
selected?: boolean;
}[];
}[];
/**
* Aria label, for accessibility reasons
*/
ariaLabel?: string;
/**
* Aria labelled by, for accessibility reasons
*/
ariaLabelledBy?: string;
/**
* Select form id <br>
* The `<form>` element to associate the `<select>` with (its form owner). The value of this attribute must be the id of a `<form>` in the same document.
*/
form?: string;
/**
* Use default value over the selected props on options.
*/
defaultValue?: string;
/**
* Select placeholder
*/
placeholder?: string;
/**
* Whether select is required or not
*/
isRequired?: boolean;
/**
* Whether select is disabled or not
*/
isDisabled?: boolean;
/**
* Function called on select change
* @param event
*/
onChange?: (e: React.ChangeEvent<HTMLElement>) => void;
/**
* Optional additional className
*/
className?: string;
}