[ARVADOS-WORKBENCH2] updated: 1.2.0-722-ge4a6389
Git user
git at public.curoverse.com
Tue Oct 23 09:28:34 EDT 2018
Summary of changes:
.../search-bar/search-bar-advanced-view.tsx | 13 +++----------
src/views-components/search-bar/search-bar-view.tsx | 4 ++--
2 files changed, 5 insertions(+), 12 deletions(-)
via e4a638955dca468972e85c296a2bc7b6e33423c9 (commit)
from 8f42eae95848318db3f09a4424424560d36f2edd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e4a638955dca468972e85c296a2bc7b6e33423c9
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Tue Oct 23 15:28:22 2018 +0200
fixed tags
Feature #14391
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
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 bfa1e6a..c658c33 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">
diff --git a/src/views-components/search-bar/search-bar-view.tsx b/src/views-components/search-bar/search-bar-view.tsx
index b923530..68418ba 100644
--- a/src/views-components/search-bar/search-bar-view.tsx
+++ b/src/views-components/search-bar/search-bar-view.tsx
@@ -18,7 +18,7 @@ import SearchIcon from '@material-ui/icons/Search';
import { RemoveIcon, EditSavedQueryIcon } from '~/components/icon/icon';
import { SearchView } from '~/store/search-bar/search-bar-reducer';
import { SearchBarBasicView } from '~/views-components/search-bar/search-bar-basic-view';
-import { SearchBarAdvancedView, Tags } from '~/views-components/search-bar/search-bar-advanced-view';
+import { SearchBarAdvancedView } from '~/views-components/search-bar/search-bar-advanced-view';
import { SearchBarAutocompleteView, SearchBarAutocompleteViewDataProps } from '~/views-components/search-bar/search-bar-autocomplete-view';
import { ArvadosTheme } from '~/common/custom-theme';
import { SearchBarAdvanceFormData } from '~/models/search-bar';
@@ -54,7 +54,7 @@ type SearchBarDataProps = {
currentView: string;
isPopoverOpen: boolean;
savedQueries: SearchBarAdvanceFormData[];
- tags: Tags;
+ tags: any;
} & SearchBarAutocompleteViewDataProps;
interface SearchBarActionProps {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list