Repository URL to install this package:
|
Version:
3.1.1 ▾
|
import * as React from 'react';
import { ValidationStrategy } from '../strategies';
import { ObserverInputProps, InputRenderProps } from './typings';
/**
* @thought
* observable stuff here should be probably in the render of plugin
* @thought
* we *may* want to support `onChange` here
* but probably best to allow *only 1 way* (using state)
*/
export declare class ObserverInput<Props extends ObserverInputProps = ObserverInputProps> extends React.Component<Props> {
static contextType: React.Context<ValidationStrategy>;
static defaultProps: {
renderInput: (props: InputRenderProps) => JSX.Element;
renderWrap: (props: InputRenderProps) => JSX.Element;
renderLabelText: (props: InputRenderProps) => JSX.Element;
renderAfterInput: (props: InputRenderProps) => JSX.Element;
renderError: (props: InputRenderProps) => JSX.Element;
};
context: ValidationStrategy;
observableState: import("./InputState").InputState<import("./typings").AnyObj>;
handleChange: (event: React.ChangeEvent<any>) => void;
handleOnFocus: (event: React.FocusEvent<any>) => void;
handleOnBlur: (event: React.FocusEvent<any>) => void;
render(): JSX.Element;
}