X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/79f3533ad0df48c8d6083d5c34f9b7f419173afe..a94211e27f3eebaea55ccba096869f70161e74ad:/src/views-components/search-bar/search-bar-advanced-view.tsx diff --git a/src/views-components/search-bar/search-bar-advanced-view.tsx b/src/views-components/search-bar/search-bar-advanced-view.tsx index 068ed163..10e535c5 100644 --- a/src/views-components/search-bar/search-bar-advanced-view.tsx +++ b/src/views-components/search-bar/search-bar-advanced-view.tsx @@ -60,25 +60,24 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ } }); -interface SearchBarAdvancedViewDataProps { +interface SearchBarAdvancedViewFormDataProps { submitting: boolean; invalid: boolean; pristine: boolean; } -export interface Tags { - values?: { - properties?: { key: string, value: string }, - }; +export interface SearchBarAdvancedViewDataProps { + tags: any; } -interface SearchBarAdvancedViewActionProps { - setView: (currentView: string) => void; +export interface SearchBarAdvancedViewActionProps { + onSetView: (currentView: string) => void; saveQuery: (data: SearchBarAdvanceFormData) => void; - tags: Tags; } -type SearchBarAdvancedViewProps = SearchBarAdvancedViewActionProps & SearchBarAdvancedViewDataProps +type SearchBarAdvancedViewProps = SearchBarAdvancedViewActionProps & SearchBarAdvancedViewDataProps; + +type SearchBarAdvancedViewFormProps = SearchBarAdvancedViewProps & SearchBarAdvancedViewFormDataProps & InjectedFormProps & WithStyles; const validate = (values: any) => { @@ -94,7 +93,7 @@ const validate = (values: any) => { }; export const SearchBarAdvancedView = compose( - reduxForm({ + reduxForm({ form: SEARCH_BAR_ADVANCE_FORM_NAME, validate, onSubmit: (data: SearchBarAdvanceFormData, dispatch: Dispatch) => { @@ -103,7 +102,7 @@ export const SearchBarAdvancedView = compose( } }), withStyles(styles))( - ({ classes, setView, handleSubmit, submitting, invalid, pristine, tags }: SearchBarAdvancedViewProps) => + ({ classes, onSetView, handleSubmit, submitting, invalid, pristine, tags }: SearchBarAdvancedViewFormProps) =>
@@ -132,7 +131,7 @@ export const SearchBarAdvancedView = compose( - setView(SearchView.BASIC)} className={classes.closeIcon}> + onSetView(SearchView.BASIC)} className={classes.closeIcon}> @@ -159,7 +158,8 @@ export const SearchBarAdvancedView = compose(