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.
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.