@@ -8,7 +8,12 @@ import isFunction from 'lodash/isFunction';
88import SearchableSelectInput from '../../../components/SearchableSelectInput' ;
99
1010/* http actions */
11- const { getAgencies, getFeatureTypes, getAdministrativeAreas } = httpActions ;
11+ const {
12+ getAgencies,
13+ getFeatureTypes,
14+ getAdministrativeAreas,
15+ getPartyOwnerships,
16+ } = httpActions ;
1217
1318/* state actions */
1419const { clearFeatureFilters, filterFeatures } = reduxActions ;
@@ -145,11 +150,32 @@ const FeatureFiltersForm = ({
145150 onCache = { ( custodians ) =>
146151 onCache ( { 'relations.custodians' : custodians } )
147152 }
148- initialValue = { get ( cached , 'relations.custodians' , [ ] ) }
153+ initisFilterialValue = { get ( cached , 'relations.custodians' , [ ] ) }
149154 />
150155 </ Form . Item >
151156 { /* end:feature custodians filter */ }
152157
158+ { /* start:feature ownership filter */ }
159+ < Form . Item
160+ label = "By ownership"
161+ title = "Critical infrastructure Ownership e.g Government"
162+ name = { [ 'relations.ownership' ] }
163+ >
164+ < SearchableSelectInput
165+ onSearch = { ( optns = { } ) => {
166+ return getPartyOwnerships ( optns ) ;
167+ } }
168+ optionLabel = { ( ownership ) => get ( ownership , 'strings.name.en' ) }
169+ optionValue = "_id"
170+ mode = "multiple"
171+ onCache = { ( ownerships ) =>
172+ onCache ( { 'relations.ownerships' : ownerships } )
173+ }
174+ initialValue = { get ( cached , 'relations.ownership' , [ ] ) }
175+ />
176+ </ Form . Item >
177+ { /* end:feature ownership filter */ }
178+
153179 { /* start:form actions */ }
154180 < Form . Item wrapperCol = { { span : 24 } } style = { { textAlign : 'right' } } >
155181 < Button onClick = { onCancel } > Cancel</ Button >
0 commit comments