handleInputClick(e)}\n className={`listings-select__dropdown-input ${showMenu ? 'open' : ''}`}\n >\n
\n {getDisplay()}\n
\n
\n
\n\n {showMenu && (\n \n {options.map(option => {\n if (option.id === 'all') {\n return null;\n }\n\n return (\n \n );\n })}\n\n \n
\n )}\n >\n );\n};\n\nexport default ListingSelect;\n","import React, { useEffect } from 'react';\nimport { Options } from '.';\nimport ListingSelect from './listing-select';\n\nconst ListingFilters = ({\n filterLabel,\n filterLabelMobile,\n filters,\n selectedLocations,\n handlerSelectedLocation\n}: {\n filterLabel: string;\n filterLabelMobile: string;\n filters: Options[];\n selectedLocations: string[];\n handlerSelectedLocation: (value: string[]) => void;\n}) => {\n useEffect(() => {\n if (selectedLocations.length === 0) {\n handlerSelectedLocation(['all']);\n }\n }, [selectedLocations]);\n\n const onChange = (ids: string[], isMobile?: boolean) => {\n // If 'all' is selected, reset the selection to just 'all'\n if (ids.includes('all')) {\n handlerSelectedLocation(['all']);\n return;\n }\n\n // Toggle the selection state of each id\n let currentSelectionSet = new Set