X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8f42eae95848318db3f09a4424424560d36f2edd..589a72bc858a9dec96f1fcecede0a0cff3e5b32a:/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 bfa1e6aa..c658c33b 100644
--- a/src/views-components/search-bar/search-bar-advanced-view.tsx
+++ b/src/views-components/search-bar/search-bar-advanced-view.tsx
@@ -66,18 +66,10 @@ interface SearchBarAdvancedViewDataProps {
     pristine: boolean;
 }
 
-export interface Tags {
-    values?: {
-        properties?: { key: string, value: string },
-        value?: string;
-        key?: string;
-    };
-}
-
 interface SearchBarAdvancedViewActionProps {
     setView: (currentView: string) => void;
     saveQuery: (data: SearchBarAdvanceFormData) => void;
-    tags: Tags;
+    tags: any;
 }
 
 type SearchBarAdvancedViewProps = SearchBarAdvancedViewActionProps & SearchBarAdvancedViewDataProps
@@ -161,7 +153,8 @@ export const SearchBarAdvancedView = compose(
                             <Grid container item xs={12} justify='flex-end'>
                                 <div className={classes.buttonWrapper}>
                                     <Button type="submit" className={classes.button}
-                                        disabled={invalid || submitting || pristine || !!((tags.values!.key || tags.values!.value) && !tags.values!.properties)}
+                                    // ToDo: create easier condition
+                                        disabled={invalid || submitting || pristine || !!(tags && tags.values && ((tags.values.key) || (tags.values.value)) && !Object.keys(tags.values).find(el => el !== 'value' && el !== 'key'))}
                                         color="primary"
                                         size='small'
                                         variant="contained">
