Hi!
I’m having a problem with combobox with CallbackDataProvider. It seems that CallbackDataProviders methods comes called twice everytime user enters a key in the combobox.
Example code that returns always 3 rows:
ComboBox<String> combo = new ComboBox<>();
CallbackDataProvider<String, String> dataProvider = new CallbackDataProvider<>(
query -> {
LOG.debug("--QUERY-- " + query.getFilter().orElse(""));
List<String> test = new ArrayList<>();
test.add(query.getFilter().orElse(""));
test.add("AA");
test.add("BB");
return test.stream();
},
query -> {
LOG.debug("--COUNT--");
return 3;
});
combo.setDataProvider(dataProvider);
When user enters “f” key, log looks this:
--QUERY-- f
--COUNT--
--QUERY-- f
--COUNT--
Am I missing something or is there bug in the framework?