When I only add 1 character in the search field it will show some strange behaviour.
It will show everything that is listed, not depending on what character is filled in. When a second character is added it will search like normal.
Is there a way to change the controler to start searching with 1 character input?
My controller:
<?php
return function ($site) {
$results = page('icons')->children();
$query = get('q');
if($query) {
$results = page('icons')->search($query, 'title|tags|pack');
}
return [
'query' => $query,
'results' => $results,
];
};