forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): Add Template/Cron workflow filter to workflow page. Closes a…
…rgoproj#4532 (argoproj#4543) Signed-off-by: Tianchu Zhao <evantczhao@gmail.com> Signed-off-by: Paul Brabban <paul.brabban@gmail.com>
- Loading branch information
Showing
4 changed files
with
85 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {DataLoader, Select, SelectOption} from 'argo-ui'; | ||
import * as React from 'react'; | ||
|
||
export const DataLoaderDropdown = (props: {load: Promise<(string | SelectOption)[]>; onChange: (value: string) => void}) => { | ||
const [selected, setSelected] = React.useState(''); | ||
|
||
return ( | ||
<DataLoader load={() => props.load}> | ||
{list => ( | ||
<Select | ||
options={list} | ||
value={selected} | ||
onChange={x => { | ||
setSelected(x.value); | ||
props.onChange(x.value); | ||
}} | ||
/> | ||
)} | ||
</DataLoader> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters