Search component error when "show-on-focus" false
Hi,
on "KTSearch" whene "show-on-focus' definition is turned "false", then got error when trying to access "minLength"
var _focus = function() {
the.element.classList.add("focus");
if ( _getOption("show-on-focus") === true || the.inputElement.value.length >= minLength ) {
_show();
}
} I think missing there is "the" before minLength, like the.minLength.
this is the issue there?
Replies (1)
Hi,
Thank you for the feedback. Noted and we will fix this issue in the next update.
In the meantime, you can fix this issue by following below steps:
-
Open <code>src/js/components/search.js</code>
-
Add below code after line 52.
-
In line 149 change <code>minLength</code> to <code>the.minLength</code>.
-
In line 173 change <code>minLength</code> to <code>the.minLength</code>.
Then recompile your assets folder with <a href="https://preview.keenthemes.com/html/metronic/docs/getting-started/build/gulp">Gulp</a> or <a href="https://preview.keenthemes.com/html/metronic/docs/getting-started/build/webpack">Webpack</a>.
Please note that the build tools are required only in the development environment just to compile the assets when the source folder files are modified. In the hosting/server deployment, you will only need the compile assets, no need to install the build tools dependencies there.
Regards.