1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Refresh search when logs get changed

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2020-10-22 11:22:54 +03:00
parent 45b6fafd38
commit a6eb28335d
2 changed files with 3 additions and 1 deletions

View File

@ -49,6 +49,8 @@ export class PodLogsStore extends DockTabStore<IPodLogsData> {
reaction(() => this.logs.get(dockStore.selectedTabId), () => {
this.setNewLogSince(dockStore.selectedTabId);
// Refresh search when logs changed
searchStore.onSearch(this.logs.get(dockStore.selectedTabId));
})
reaction(() => dockStore.selectedTabId, () => {

View File

@ -12,7 +12,7 @@ export class SearchStore {
* @param query Search query from input
*/
@action
onSearch(text: string[], query: string) {
onSearch(text: string[], query = this.searchQuery) {
this.searchQuery = query;
if (!query) {
this.reset();