X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/48f4ed31a9a20400e4f0707fdbf1c64ac6d04157..18e6bbd6a0bb60b7f1137fab2dfb88ed7804a8ac:/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts diff --git a/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts b/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts index 562b3126e8..866e148bcd 100644 --- a/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts +++ b/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts @@ -41,6 +41,9 @@ export class SearchResultsMiddlewareService extends DataExplorerMiddlewareServic const { cluster: clusterId } = getAdvancedDataFromQuery(searchValue); const sessions = getSearchSessions(clusterId, state.auth.sessions); const recentQueries = this.services.searchService.getRecentQueries(); + //the last query is compared to the current query to check if the value has changed + //once the search button is clicked, the value is pushed to the recentQueries array + //therefore, the last query is the second to last element in the array const lastQuery = recentQueries[recentQueries.length - 2]; if (searchValue.trim() === '') {