Added function to clear search field when navigating to transactions view, if a selected transaction id is given.
This commit is contained in:
parent
b91b0a8263
commit
36c29e0d06
|
@ -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 -> {
|
||||
|
|
Loading…
Reference in New Issue