X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1bcfe8651af341c6e7cd01a19443c7c288efa932..bef091f69353d5a1ec7ef6c4e84f81756023596b:/apps/workbench/app/assets/javascripts/filterable.js diff --git a/apps/workbench/app/assets/javascripts/filterable.js b/apps/workbench/app/assets/javascripts/filterable.js index 27473ad285..40df5c7174 100644 --- a/apps/workbench/app/assets/javascripts/filterable.js +++ b/apps/workbench/app/assets/javascripts/filterable.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // filterable.js shows/hides content when the user operates // search/select widgets. For "infinite scroll" content, it passes the // filters to the server and retrieves new content. For other content, @@ -52,11 +56,13 @@ function updateFilterableQueryNow($target) { var newquery = $target.data('filterable-query-new'); var params = $target.data('infinite-content-params-filterable') || {}; - if (newquery == null || newquery == '') { - params.filters = []; + var tsquery = to_tsquery(newquery); + if (tsquery == null) { + params.filters = []; } else { - params.filters = [['any', '@@', newquery.concat(':*')]]; + params.filters = [['any', '@@', tsquery]]; } + $(".modal-dialog-preview-pane").html(""); $target.data('infinite-content-params-filterable', params); $target.data('filterable-query', newquery); }