mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Improve typeahead on dashboard page
This commit is contained in:
@@ -13,6 +13,11 @@ $(function () {
|
||||
$container.find("li:not(.query-holder)").remove();
|
||||
|
||||
$query.on("change", function () {
|
||||
if ($container.attr("data-typeahead-field") && $query.val() === "") {
|
||||
$container.removeClass('focused');
|
||||
$container.find("li:not(.query-holder)").remove();
|
||||
return;
|
||||
}
|
||||
$.getJSON(
|
||||
$container.attr("data-source") + "?query=" + encodeURIComponent($query.val()),
|
||||
function (data) {
|
||||
|
||||
Reference in New Issue
Block a user