summaryrefslogtreecommitdiff
path: root/src/lib/ServiceContext.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-04-17 13:39:30 +0300
committereug-vs <eug-vs@keemail.me>2021-04-17 13:41:29 +0300
commit1bf07892f2cd8007f48469c42fa9fcc84d5ef435 (patch)
tree054d600ffa414a71f15e2dc7606121649f7587ca /src/lib/ServiceContext.tsx
parenta4a1c456e0788ca52261efb38ff3998710a42a59 (diff)
downloadcommercel-ui-1bf07892f2cd8007f48469c42fa9fcc84d5ef435.tar.gz
feat: correctly add filters from Service JSON
Diffstat (limited to 'src/lib/ServiceContext.tsx')
-rw-r--r--src/lib/ServiceContext.tsx7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/ServiceContext.tsx b/src/lib/ServiceContext.tsx
index ec76106..67f3756 100644
--- a/src/lib/ServiceContext.tsx
+++ b/src/lib/ServiceContext.tsx
@@ -2,17 +2,11 @@ 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 {
- field: string;
- options: Option[];
-}
-
export interface PanelProps<T> {
item: T;
mutate: (item: T) => void;
@@ -26,6 +20,7 @@ export interface ServiceParams<T = any> {
default?: Partial<T>;
routes?: Record<string, React.FC>;
actions?: Action[];
+ filters?: string[];
rowLink?: (item: T) => string;
Form?: React.FC<FormikProps<T>>;
Panel?: React.FC<PanelProps<T>>;