diff options
Diffstat (limited to 'src/lib/ServiceContext.tsx')
-rw-r--r-- | src/lib/ServiceContext.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/ServiceContext.tsx b/src/lib/ServiceContext.tsx index 67f3756..2001d00 100644 --- a/src/lib/ServiceContext.tsx +++ b/src/lib/ServiceContext.tsx @@ -2,11 +2,18 @@ import React from 'react'; import { FormikProps } from 'formik'; import { Props as ButtonProps } from '../components/Button'; import { Field } from '../components/ListTable'; +import { Option } from '../components/Select'; export interface Action extends ButtonProps { name: string; } +export interface Filter extends Field { + as?: string; + options?: Option[]; + value?: string; +} + export interface PanelProps<T> { item: T; mutate: (item: T) => void; @@ -20,7 +27,7 @@ export interface ServiceParams<T = any> { default?: Partial<T>; routes?: Record<string, React.FC>; actions?: Action[]; - filters?: string[]; + filters?: Filter[]; rowLink?: (item: T) => string; Form?: React.FC<FormikProps<T>>; Panel?: React.FC<PanelProps<T>>; |