@gpa-gemstone/react-forms
Version:
React Form modules for gpa webapps
53 lines (52 loc) • 1.72 kB
TypeScript
import * as React from 'react';
import { Gemstone } from '@gpa-gemstone/application-typings';
interface IProps<T> extends Omit<Gemstone.TSX.Interfaces.IBaseFormProps<T>, 'Valid' | 'Feedback'> {
/**
* CSS styles to apply to the Input component
* @type {React.CSSProperties}
* @optional
*/
Style?: React.CSSProperties;
/**
* Default value to use when adding an item and when value is null
* @type {number | string}
*/
DefaultValue: number | string;
/**
* Flag to allow null values
* @type {boolean}
* @optional
*/
AllowNull?: boolean;
/**
* Function to determine the validity of a field
* @param value - The value of the item to check
* @param index - The index of the item in the array
* @param arr - The full array of items
* @returns {boolean}
*/
ItemValid?: (value: string | number, index: number, arr: Array<string | number>) => boolean;
/**
* Feedback message to show when input is invalid
* @param value - The value of the item to check
* @param index - The index of the item in the array
* @param arr - The full array of items
* @returns {string | undefined}
*/
ItemFeedback?: (value: string | number, index: number, arr: Array<string | number>) => string | undefined;
/**
* Flag to disable add button
*/
DisableAdd?: boolean;
/**
* Flag to disable all input fields
*/
Disabled?: boolean;
/**
* List of autocomplete suggestion options
* @type {string[]}
*/
Options: string[];
}
declare function AutoCompleteMultiInput<T>(props: IProps<T>): JSX.Element;
export default AutoCompleteMultiInput;