Closed newkind closed 6 years ago
This plugin is currently broken (when using the default template and js) due to the changes implemented in #156 (1e381a79912987693fca3f551a18d3a0f7b229f6). The reason for this is the JavaScript selector (in js/simplesearch.js
) was not updated to reflect the change in name attribute of the input.
ok this has really caused some confusion.
The field should be searchfield
.
per the included partials/simplesearch_searchbox.html.twig
:
{% set min_chars = config.get('plugins.simplesearch.min_query_length', 3) %}
<div class="search-wrapper">
<form name="search" data-simplesearch-form>
<input
name="searchfield"
class="search-input"
...
with the appropriate JS:
var fields = document.querySelectorAll('input[name="searchfield"][data-search-input]');
1e381a79912987693fca3f551a18d3a0f7b229f6