You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The getTrigger() was meant to prevent locations from loading on page load, by checking if the GET variable was set for the field marked as query_trigger. The ability to not load all location results prior to a search is to ensure performance with a larger set of Locations (100+).
The getTrigger() method is more complicated than it needs to be.
Describe the solution you'd like
In index(), replace the getTrigger() check with a check against a $db boolean on Locator class that can be set via the CMS. Default is false. If marked true, all results would display on initial page load.
Describe alternatives you've considered
Instead adding a config via yaml to set default behavior for the class. This offers less flexibility without subclassing Locator so the config can be different.
The text was updated successfully, but these errors were encountered:
jsirish
added a commit
to jsirish/silverstripe-locator
that referenced
this issue
Jan 22, 2020
* REFACTOR Locator - getTrigger
Check if any GET vars exist, or if static $db ResultsOnLoad is true. If so, display results.
closes#219
* travis tweak
* phpcs
Is your feature request related to a problem? Please describe.
The
getTrigger()
was meant to prevent locations from loading on page load, by checking if the GET variable was set for the field marked asquery_trigger
. The ability to not load all location results prior to a search is to ensure performance with a larger set of Locations (100+).The
getTrigger()
method is more complicated than it needs to be.Describe the solution you'd like
In
index()
, replace thegetTrigger()
check with a check against a$db
boolean on Locator class that can be set via the CMS. Default is false. If marked true, all results would display on initial page load.Describe alternatives you've considered
Instead adding a config via yaml to set default behavior for the class. This offers less flexibility without subclassing Locator so the config can be different.
The text was updated successfully, but these errors were encountered: