Refresh search when logs get changed

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

No files matched your search

@@ -49,6 +49,8 @@ export class PodLogsStore extends DockTabStore<IPodLogsData> {
reaction(() => this.logs.get(dockStore.selectedTabId), () => { reaction(() => this.logs.get(dockStore.selectedTabId), () => {
this.setNewLogSince(dockStore.selectedTabId); this.setNewLogSince(dockStore.selectedTabId);
// Refresh search when logs changed
searchStore.onSearch(this.logs.get(dockStore.selectedTabId));
}) })
reaction(() => dockStore.selectedTabId, () => { reaction(() => dockStore.selectedTabId, () => {
+1 -1
View File
@@ -12,7 +12,7 @@ export class SearchStore {
* @param query Search query from input * @param query Search query from input
*/ */
@action @action
onSearch(text: string[], query: string) { onSearch(text: string[], query = this.searchQuery) {
this.searchQuery = query; this.searchQuery = query;
if (!query) { if (!query) {
this.reset(); this.reset();