Skip to content

Commit

Permalink
Update search results when active database changes (JabRef#11268)
Browse files Browse the repository at this point in the history
Merged origin/update-search-results into update-search-results
  • Loading branch information
LoayGhreeb authored Apr 30, 2024
1 parent 3abdefd commit 4f87740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public GlobalSearchBar(LibraryTabContainer tabContainer,
query -> setSearchTerm(query.map(SearchQuery::getQuery).orElse("")));

this.searchQueryProperty.addListener((obs, oldValue, newValue) -> newValue.ifPresent(this::updateSearchResultsForQuery));
this.searchQueryProperty.addListener((obs, oldValue, newValue) -> searchQueryProperty.get().ifPresent(this::updateSearchResultsForQuery));
this.stateManager.activeDatabaseProperty().addListener(obs -> searchQueryProperty.get().ifPresent(this::updateSearchResultsForQuery));
/*
* The listener tracks a change on the focus property value.
* This happens, from active (user types a query) to inactive / focus
Expand Down

0 comments on commit 4f87740

Please sign in to comment.