Skip to content

Commit 79d49a8

Browse files
committed
refactor(features): update filter prop types
see #250
1 parent 6c3c64d commit 79d49a8

File tree

1 file changed

+28
-20
lines changed
  • src/GeographicalFeatures/CriticalFacilities/Filters

1 file changed

+28
-20
lines changed

src/GeographicalFeatures/CriticalFacilities/Filters/index.js

+28-20
Original file line numberDiff line numberDiff line change
@@ -175,27 +175,35 @@ const FeatureFiltersForm = ({
175175
};
176176

177177
FeatureFiltersForm.propTypes = {
178-
filter: PropTypes.objectOf(
179-
PropTypes.shape({
180-
type: PropTypes.arrayOf(
181-
PropTypes.shape({
182-
_id: PropTypes.string,
183-
})
184-
),
185-
area: PropTypes.arrayOf(
186-
PropTypes.shape({
187-
_id: PropTypes.string,
188-
})
189-
),
190-
custodians: PropTypes.arrayOf(
191-
PropTypes.shape({
192-
_id: PropTypes.string,
193-
})
194-
),
195-
})
196-
),
178+
filter: PropTypes.shape({
179+
'relations.type': PropTypes.arrayOf(
180+
PropTypes.shape({
181+
_id: PropTypes.string,
182+
})
183+
),
184+
'relations.area': PropTypes.arrayOf(
185+
PropTypes.shape({
186+
_id: PropTypes.string,
187+
})
188+
),
189+
'relations.custodians': PropTypes.arrayOf(
190+
PropTypes.shape({
191+
_id: PropTypes.string,
192+
})
193+
),
194+
}),
197195
cached: PropTypes.shape({
198-
type: PropTypes.arrayOf(
196+
'relations.type': PropTypes.arrayOf(
197+
PropTypes.shape({
198+
_id: PropTypes.string,
199+
})
200+
),
201+
'relations.area': PropTypes.arrayOf(
202+
PropTypes.shape({
203+
_id: PropTypes.string,
204+
})
205+
),
206+
'relations.custodians': PropTypes.arrayOf(
199207
PropTypes.shape({
200208
_id: PropTypes.string,
201209
})

0 commit comments

Comments
 (0)