@@ -11,7 +11,8 @@ import SearchableSelectInput from '../../../components/SearchableSelectInput';
1111const { getAgencies, getFeatureTypes, getAdministrativeAreas } = httpActions ;
1212
1313/* state actions */
14- const { clearFeatureFilters, filterFeatures } = reduxActions ;
14+ const { clearFeatureFilters, filterFeatures, getPartyOwnerships } =
15+ reduxActions ;
1516
1617/* ui */
1718const labelCol = {
@@ -145,11 +146,32 @@ const FeatureFiltersForm = ({
145146 onCache = { ( custodians ) =>
146147 onCache ( { 'relations.custodians' : custodians } )
147148 }
148- initialValue = { get ( cached , 'relations.custodians' , [ ] ) }
149+ initisFilterialValue = { get ( cached , 'relations.custodians' , [ ] ) }
149150 />
150151 </ Form . Item >
151152 { /* end:feature custodians filter */ }
152153
154+ { /* start:feature ownership filter */ }
155+ < Form . Item
156+ label = "By ownership"
157+ title = "Critical infrastructure Ownership e.g Government"
158+ name = { [ 'relations.ownership' ] }
159+ >
160+ < SearchableSelectInput
161+ onSearch = { ( optns = { } ) => {
162+ return getPartyOwnerships ( optns ) ;
163+ } }
164+ optionLabel = { ( ownership ) => get ( ownership , 'name' ) }
165+ optionValue = "_id"
166+ mode = "multiple"
167+ onCache = { ( ownerships ) =>
168+ onCache ( { 'relations.ownerships' : ownerships } )
169+ }
170+ initialValue = { get ( cached , 'relations.ownership' , [ ] ) }
171+ />
172+ </ Form . Item >
173+ { /* end:feature ownership filter */ }
174+
153175 { /* start:form actions */ }
154176 < Form . Item wrapperCol = { { span : 24 } } style = { { textAlign : 'right' } } >
155177 < Button onClick = { onCancel } > Cancel</ Button >
0 commit comments