mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added lab search
This commit is contained in:
parent
16d12f92da
commit
ddf2b6eda3
16 changed files with 149 additions and 28 deletions
|
@ -15,6 +15,8 @@ export interface LabContextProps {
|
|||
updates: IFlowNode[];
|
||||
sort: LabNodesSort;
|
||||
setSort: (sort: LabNodesSort) => void;
|
||||
search: string;
|
||||
setSearch: (val: string) => void;
|
||||
}
|
||||
|
||||
const defaultValues: LabContextProps = {
|
||||
|
@ -28,6 +30,8 @@ const defaultValues: LabContextProps = {
|
|||
updates: [],
|
||||
sort: LabNodesSort.New,
|
||||
setSort: () => {},
|
||||
search: '',
|
||||
setSearch: () => {},
|
||||
};
|
||||
|
||||
const LabContext = createContext<LabContextProps>(defaultValues);
|
||||
|
|
|
@ -17,6 +17,8 @@ const LabProvider: FC<LabProviderProps> = ({ children }) => {
|
|||
updates,
|
||||
sort,
|
||||
setSort,
|
||||
search,
|
||||
setSearch,
|
||||
} = useLab();
|
||||
|
||||
return (
|
||||
|
@ -31,6 +33,8 @@ const LabProvider: FC<LabProviderProps> = ({ children }) => {
|
|||
updates={updates}
|
||||
sort={sort}
|
||||
setSort={setSort}
|
||||
search={search}
|
||||
setSearch={setSearch}
|
||||
>
|
||||
{children}
|
||||
</LabContextProvider>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue