jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Use fetch callback to load users while searching in EntityLogView

Open Flaurite opened this issue 1 year ago • 0 comments

Description

In EntityLogView users ComboBox loads all users immediately on init event:

@Subscribe
protected void onInit(View.InitEvent event) {
    // ...
    userField.setItems(userRepository.getByUsernameLike("")
            .stream()
            .map(UserDetails::getUsername)
            .collect(Collectors.toList()));

We can implement lazy loading using setItemsFetchCallback().

Flaurite avatar Mar 22 '24 08:03 Flaurite