Skip to content

Commit cb8df18

Browse files
liuhaoXDbuchen
authored andcommitted
fix: keyword not reset when switching tab
1 parent 5decaef commit cb8df18

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/util/searchfilter/TransactionSearchField.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@ protected Control createControl(Composite parent)
4242
search.setMessage(Messages.LabelSearch);
4343
search.setSize(300, SWT.DEFAULT);
4444

45+
// reset filterText when user switch tab
46+
search.addDisposeListener(e->{
47+
filterText = null;
48+
onRecalculationNeeded.accept(filterText);
49+
});
50+
4551
search.addModifyListener(e -> {
4652
var text = search.getText().trim();
47-
if (text.length() == 0)
53+
if (text.isEmpty())
4854
{
4955
filterText = null;
5056
onRecalculationNeeded.accept(filterText);

0 commit comments

Comments
 (0)