office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
29 lines (28 loc) • 1.07 kB
TypeScript
/// <reference types="react" />
import { IChoiceGroupProps } from './ChoiceGroup.types';
import { BaseComponent } from '../../Utilities';
export interface IChoiceGroupState {
keyChecked: string | number;
/** Is true when the control has focus. */
keyFocused?: string | number;
}
export declare class ChoiceGroup extends BaseComponent<IChoiceGroupProps, IChoiceGroupState> {
static defaultProps: IChoiceGroupProps;
private _id;
private _labelId;
private _inputElement;
constructor(props: IChoiceGroupProps);
componentWillReceiveProps(newProps: IChoiceGroupProps): void;
render(): JSX.Element;
focus(): void;
private _onFocus(option, ev);
private _onBlur(option, ev);
private _onRenderField(option);
private _onRenderLabel(option);
private _onChange(option, evt);
/**
* If all the isChecked property of options are falsy values, return undefined;
* Else return the key of the first option with the truthy isChecked property.
*/
private _getKeyChecked(props);
}