Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public abstract class ComboBoxBase<TComponent extends ComboBoxBase<TComponent, T
HasValidationProperties, HasValidator<TValue>, HasPlaceholder {
private static final int DEFAULT_FILTER_TIMEOUT = 500;

private String lastKnownFilter;

/**
* Registration for custom value listeners that disallows entering custom
* values as soon as there are no more listeners for the custom value event
Expand Down Expand Up @@ -346,9 +348,8 @@ public void setAllowCustomValue(boolean allowCustomValue) {
*
* @return the filter string
*/
@Synchronize(property = "filter", value = "filter-changed")
protected String getFilter() {
return getElement().getProperty("filter");
return lastKnownFilter;
}

/**
Expand All @@ -359,7 +360,11 @@ protected String getFilter() {
* @param filter
* the String value to set
*/
@Deprecated
protected void setFilter(String filter) {
lastKnownFilter = filter;
// MT 20250-02-21 I assume client side never uses this, probably the
// whole method is obsolete
getElement().setProperty("filter", filter == null ? "" : filter);
}

Expand Down Expand Up @@ -1367,6 +1372,7 @@ private void confirmUpdate(int id) {
*/
@ClientCallable
private void setViewportRange(int start, int length, String filter) {
this.lastKnownFilter = filter;
dataController.setViewportRange(start, length, filter);
}

Expand Down