Skip to content

Commit 7b0c2a9

Browse files
committed
feat: preserve filter across loads of data
1 parent 3041af0 commit 7b0c2a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ impl LogViewerApp {
297297
}
298298
LoadingStatus::Success(data) => {
299299
self.loading_status = match Data::try_from(&data[..]) {
300-
Ok(data) => {
300+
Ok(mut data) => {
301+
if let Some(old_data) = self.data.as_mut() {
302+
// Preserve filter across loads of the data
303+
data.filter = old_data.filter.take();
304+
}
301305
self.data = Some(data);
302306
LoadingStatus::NotInProgress
303307
}

0 commit comments

Comments
 (0)