UNPKG

@gpa-gemstone/react-interactive

Version:
39 lines (38 loc) 1.25 kB
import * as React from 'react'; interface IProps<T> { CollumnList: Search.IField<T>[]; SetFilter: (filters: Search.IFilter<T>[]) => void; defaultCollumn?: Search.IField<T>; Direction?: 'left' | 'right'; Width?: string | number; Label?: string; GetEnum?: EnumSetter<T>; ShowLoading?: boolean; ResultNote?: string; StorageID?: string; } interface IOptions { Value: string; Label: string; } type EnumSetter<T> = (setOptions: (options: IOptions[]) => void, field: Search.IField<T>) => () => void; export declare namespace Search { type FieldType = ('string' | 'number' | 'enum' | 'integer' | 'datetime' | 'boolean' | 'date' | 'time' | "query"); interface IField<T> { label: string; key: string; type: FieldType; enum?: IOptions[]; isPivotField: boolean; } type OperatorType = ('=' | '<>' | '>' | '<' | '>=' | '<=' | 'LIKE' | 'NOT LIKE' | 'IN' | 'NOT IN'); interface IFilter<T> { FieldName: string; SearchText: string; Operator: Search.OperatorType; Type: Search.FieldType; IsPivotColumn: boolean; } } export default function SearchBar<T>(props: React.PropsWithChildren<IProps<T>>): JSX.Element; export {};