Commit 19351948 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

Institute filters: has accessions

Fixed radio button not selected after submit
parent ac7c6420
......@@ -136,6 +136,7 @@
},
"wiews": {
"code": "Institute code",
"accessions": "Has accessions",
"country": {
"iso3": "Country code"
}
......
......@@ -7,6 +7,7 @@ import CountryFilter from './CountryFilter';
class FaoInstituteFilter {
public code: string[];
public accessions: boolean;
public name: StringFilter;
public country: CountryFilter;
}
......
......@@ -39,7 +39,7 @@ class BooleanFilterInternal extends React.Component<IBooleanFilterInternal, any>
<FormControl component="fieldset">
<FormLabel>{ label }</FormLabel>
<RadioGroup
value={ this.state.value }
value={ `${this.state.value}` }
onChange={ this.handleChange }
>
<FormControlLabel value="true" control={ <Radio /> } label="Yes" />
......
......@@ -7,6 +7,7 @@ import FiltersBlock from 'ui/common/filter/FiltersBlock';
import CollapsibleComponentSearch from 'ui/common/filter/CollapsibleComponentSearch';
import StringFilter from 'ui/common/filter/StringFilter';
import StringArrFilter from 'ui/common/filter/StringArrFilter';
import BooleanFilter from 'ui/common/filter/BooleanFilter';
const AccessionFilters = ({handleSubmit, initialValues, initialize, ...other}) => {
// console.log('AccessionFilters', initialValues);
......@@ -16,6 +17,9 @@ const AccessionFilters = ({handleSubmit, initialValues, initialize, ...other}) =
<StringArrFilter name="code" label="Institute code" placeholder="NGA039"/>
<StringFilter name="name" label="Institute name" searchType="contains" placeholder="Plant Genetic Resources Unit"/>
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title="Accessions">
<BooleanFilter name="accessions" label="Has accessions"/>
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title="Location">
<StringArrFilter name="country.iso3" label="Country" placeholder="SVN"/>
</CollapsibleComponentSearch>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment