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:
parent
45b6fafd38
commit
a6eb28335d
@ -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, () => {
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user