Skip to content

Commit

Permalink
support filters without schemas in advanced search
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Apr 2, 2024
1 parent 9fa828c commit 0ab159c
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,21 @@ function SearchAdvancedFilters() {
)}
{schemaFilters.map((schemaFilter) => {
if (
!showSchemaFilter(schemaFilter) ||
(schemaFilter?.type !== 'string' && !showSchemaFilter(schemaFilter)) ||
isIncompatibleFilterBySelection(schemaFilter, searchFilters)
) {
return null
}
const { id, disabled, options, optionsSelected } = schemaFilter
const { id, type, disabled, options, optionsSelected } = schemaFilter
const translationKey = id === 'shiptypes' ? `gfw_${id}` : id
if (type === 'string' && !options?.length) {
return (
<AdvancedFilterInputField
field={id as keyof VesselSearchState}
onChange={onInputChange}
/>
)
}
return (
<MultiSelect
key={id}
Expand Down

0 comments on commit 0ab159c

Please sign in to comment.