Repository navigation
FilterSearch updates for builtin.location - #343
Conversation
|
Current unit coverage is 88.8646288209607% |
oshi97
left a comment
There was a problem hiding this comment.
I was wondering if we'd want to put this weird business logic into headless, since this is the kind of weird business logic that's easy to forget about, but at least right now I'm pretty sure we wouldn't want to do that.
Yeah, I didn't think we'd want to bake this into headless because it seems to mostly affect the UI for now and it sounds like Product is thinking of making a separate endpoint for this case anyways. I'm not a big fan of having this kind of weird logic in |
### Features - Default behavior of `FilterSearch` was changed to better support Locators and Doctor Finders. Additionally, a new `onSelect` prop was added to the Component. The `searchOnSelect` prop is now deprecated. (#323, #343, #333) - A new CSS bundle without the Tailwind resets is exported. (#322) - We've added a `MapboxMap` Component, powered by v2 of their JavaScript API. (#332) ### Changes - Assorted updates to improve our GH Actions. - Styling of Facet Headers is now exposed in `FilterGroupCssClasses`. (#321) ### Bug Fixes - Vulnerabilities were addressed for the repo and its test-site. - Fixed the Dropdown Component to invoke `preventDefault` only when it is active. (#307) - Corrected a small error in the generation of SSR Hydration IDs. (#315)
Update
FilterSearchto account for special backend logic when searching on thebuiltin.locationfield. In this case, the backend can return filters onbuiltin.regionoraddress.countryCodeas well, so thesefieldIds are also considered "matching" for the component. Filters on these fields can be used to populate the input and should be unselected when a new filter is selected fromFilterSearch.J=SLAP-2495
TEST=auto, manual
See that the added Jest tests pass. Spin up the test-site and add static filters on
builtin.region. See that they are used to populate theFilterSearchinput, warnings are logged, and the filters are unselected byFilterSearchas expected.