Please try the below code. I have not tested this.
new StringFilter("someValue") {
@Override
protected void fireUpdate() {
super.fireUpdate();
List<Component> items = menu.getItems();
if (!items.isEmpty()) {
((Field) items.get(0)).setValue("");
}
// Not tested this. If the above code is not working try to get the
textfield instance somehow from the menu and clear it
}
};
If you want to clear the value only on user's key enter and not on programmatic filter (via setValue()), then the above will not work. You have to override the onFieldKeyUp method and clear it using some scheduler.