diff options
Diffstat (limited to 'src/containers/Page.tsx')
-rw-r--r-- | src/containers/Page.tsx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/containers/Page.tsx b/src/containers/Page.tsx index d659510..467e458 100644 --- a/src/containers/Page.tsx +++ b/src/containers/Page.tsx @@ -1,13 +1,8 @@ import React from 'react'; import Paper from '../components/Paper'; import Button from '../components/Button'; -import { Action } from '../lib/ServiceContext'; -import { Option, SelectBase } from '../components/Select'; -import { Field } from '../components/ListTable'; - -export interface Filter extends Field { - options?: Option[]; -} +import { Action, Filter } from '../lib/ServiceContext'; +import { SelectBase } from '../components/Select'; interface Props { title?: string; @@ -25,7 +20,9 @@ const Page: React.FC<Props> = ({ title, actions, filters, className, children }) <span className="text-2xl font-bold">{title}</span> <div className="flex"> <div className="mr-6 flex"> - {filters?.map(filter => (<SelectBase key={filter.key} options={filter.options || []} />))} + {filters?.map(filter => ( + <SelectBase key={filter.key} options={filter.options || []} value={filter.value} /> + ))} </div> <div> {actions?.map(action => (<Button {...action} key={action.name} size="sm">{action.name}</Button>))} |