mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-27 07:14:26 +01:00
Show facet values even for empty queries
This commit is contained in:
parent
3916c54501
commit
2cd8675734
@ -4,7 +4,6 @@ var timeoutID = null;
|
|||||||
$('#query, #facet').on('input', function () {
|
$('#query, #facet').on('input', function () {
|
||||||
var query = $('#query').val();
|
var query = $('#query').val();
|
||||||
var facet = $('#facet').val();
|
var facet = $('#facet').val();
|
||||||
let fetchFacetDistribution = query.trim() !== "" || facet.trim() !== "";
|
|
||||||
var timeoutMs = 100;
|
var timeoutMs = 100;
|
||||||
|
|
||||||
if (timeoutID !== null) {
|
if (timeoutID !== null) {
|
||||||
@ -17,7 +16,7 @@ $('#query, #facet').on('input', function () {
|
|||||||
url: "query",
|
url: "query",
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
'query': query, 'facetCondition': facet, "facetDistribution": fetchFacetDistribution
|
'query': query, 'facetCondition': facet, "facetDistribution": true
|
||||||
}),
|
}),
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
success: function (data, textStatus, request) {
|
success: function (data, textStatus, request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user