Add support for placeholder search for empty queries

This commit is contained in:
Kerollmops 2020-10-06 14:52:05 +02:00 committed by Clément Renault
parent 433d9bbc6e
commit a00f5850ee
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
4 changed files with 33 additions and 17 deletions

View file

@ -74,3 +74,9 @@ $('#docs-count').text(function(index, text) {
$('#db-size').text(function(index, text) {
return filesize(parseInt(text))
});
// We trigger the input when we load the script, this way
// we execute a placeholder search when the input is empty.
$(window).on('load', function () {
$('#search').trigger('input');
});