From 2820212ec0df02a85ae74ede8c52d3b5e936c6aa Mon Sep 17 00:00:00 2001 From: Janicki Artur Date: Thu, 11 Oct 2018 14:11:13 +0200 Subject: [PATCH] add checkbox field component and change advance form Feature #13827 Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- .../checkbox-field/checkbox-field.tsx | 27 +++++++++++++++++++ src/store/search-bar/search-bar-actions.ts | 2 ++ .../form-fields/search-bar-form-fields.tsx | 25 ++++++----------- 3 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 src/components/checkbox-field/checkbox-field.tsx diff --git a/src/components/checkbox-field/checkbox-field.tsx b/src/components/checkbox-field/checkbox-field.tsx new file mode 100644 index 0000000000..b8f18e7fdc --- /dev/null +++ b/src/components/checkbox-field/checkbox-field.tsx @@ -0,0 +1,27 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +import * as React from 'react'; +import { WrappedFieldProps } from 'redux-form'; +import { ArvadosTheme } from '~/common/custom-theme'; +import { FormControlLabel, Checkbox, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core'; + +type CssRules = 'checkboxField'; + +const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ + checkboxField: { + + } +}); + +export const CheckboxField = withStyles(styles)((props: WrappedFieldProps & WithStyles & { label?: string }) => + + } + label={props.label} + />); \ No newline at end of file diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts index dbc77a84e9..7a13197a0e 100644 --- a/src/store/search-bar/search-bar-actions.ts +++ b/src/store/search-bar/search-bar-actions.ts @@ -25,8 +25,10 @@ export interface SearchBarAdvanceFormData { type?: GroupContentsResource; cluster?: string; project?: string; + inTrash: boolean; dataFrom: string; dataTo: string; + saveQuery: boolean; searchQuery: string; } diff --git a/src/views-components/form-fields/search-bar-form-fields.tsx b/src/views-components/form-fields/search-bar-form-fields.tsx index 269113218c..8d058ec3e2 100644 --- a/src/views-components/form-fields/search-bar-form-fields.tsx +++ b/src/views-components/form-fields/search-bar-form-fields.tsx @@ -3,8 +3,9 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from "react"; -import { Field } from "redux-form"; +import { Field } from 'redux-form'; import { TextField } from "~/components/text-field/text-field"; +import { CheckboxField } from '~/components/checkbox-field/checkbox-field'; import { Checkbox, FormControlLabel } from '@material-ui/core'; export const SearchBarTypeField = () => @@ -26,14 +27,9 @@ export const SearchBarProjectField = () => label="Project name" />; export const SearchBarTrashField = () => - - } + ; export const SearchBarDataFromField = () => @@ -61,14 +57,9 @@ export const SearchBarValueField = () => label="Value" />; export const SearchBarSaveSearchField = () => - - } + ; export const SearchBarQuerySearchField = () => -- 2.30.2