@gpa-gemstone/react-table
Version:
Table for GPA web applications
38 lines (37 loc) • 1 kB
TypeScript
import { Search } from '@gpa-gemstone/react-interactive';
/**
* Represents an option with a value and label.
*/
interface IOptions {
Value: string | number;
Label: string;
}
/**
* Represents the properties expected by the EnumFilter component.
*/
interface IProps<T> {
/**
* Function to set the filter based on Search.IFilter<T> array.
* @param evt - Event handler that updates the filter.
*/
SetFilter: (evt: Search.IFilter<T>[]) => void;
/**
* Array of filters of type Search.IFilter<T>.
*/
Filter: Search.IFilter<T>[];
/**
* Name of filtering field.
*/
FieldName: string;
/**
* The array of IOptions[] for filtering.
*/
Options: IOptions[];
}
/**
* Component to handle enum filtering based on provided filter props.
* @param {IProps<T>} props - Props passed to EnumFilter.
* @returns JSX element representing EnumFilter component.
*/
export declare function EnumFilter<T>(props: IProps<T>): JSX.Element;
export {};