From 36c29e0d06c83afc9ea6e960d891078b4855857d Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sun, 21 Jul 2024 13:17:58 -0400 Subject: [PATCH] Added function to clear search field when navigating to transactions view, if a selected transaction id is given. --- .../andrewlalis/perfin/control/TransactionsViewController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/andrewlalis/perfin/control/TransactionsViewController.java b/src/main/java/com/andrewlalis/perfin/control/TransactionsViewController.java index dc8e2be..0ba412f 100644 --- a/src/main/java/com/andrewlalis/perfin/control/TransactionsViewController.java +++ b/src/main/java/com/andrewlalis/perfin/control/TransactionsViewController.java @@ -138,6 +138,7 @@ public class TransactionsViewController implements RouteSelectionListener { // If a transaction id is given in the route context, navigate to the page it's on and select it. if (context instanceof RouteContext ctx && ctx.selectedTransactionId != null) { + searchField.setText(null);// First clear the search field if it's already populated. Profile.getCurrent().dataSource().useRepoAsync( TransactionRepository.class, repo -> repo.findById(ctx.selectedTransactionId).ifPresent(tx -> {