mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Add check for search result sorting
Require origin to be passed to search input in case search results are sorted by distance.
This commit is contained in:
parent
9333b53bb7
commit
c3e77ef6bb
1 changed files with 3 additions and 1 deletions
|
|
@ -174,7 +174,9 @@ class TopbarComponent extends Component {
|
|||
);
|
||||
|
||||
// Only render current search if full place object is available in the URL params
|
||||
const locationFieldsPresent = address && bounds && country;
|
||||
const locationFieldsPresent = config.sortSearchByDistance
|
||||
? address && origin && bounds && country
|
||||
: address && bounds && country;
|
||||
const initialSearchFormValues = {
|
||||
location: locationFieldsPresent
|
||||
? {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue