SimplePagination "autoLoad" feature not available in the latest v2.0

Hi,
The pagination total item count is only showing when clicking on the “?” button. I need to display the total count by default on the initial load. This feature was available in the v1.5 with “autoLoad” property.
Is this feature available in the latest version? if not is there a workaround for this?

Screenshot 2023-08-04 132417

Hello!

Thank you for reporting the problem! It will be fixed here: Support autoLoad property in SimplePagination · Issue #2111 · jmix-framework/jmix · GitHub

The only way to workaround it is overriding SimplePagination and manually load total count:

  1. Extend SimplePagination
public class ExtSimplePagination extends SimplePagination {

    @Override
    protected void updateTotalCountLabel() {
        Integer totalCount = ...  // load total count
        getTotalCountLabel().setText(String.valueOf(totalCount));
        getTotalCountLabel().setEnabled(false);
    }
}
  1. Register your extension:
@Bean
public ComponentRegistration extSimplePagination() {
    return ComponentRegistrationBuilder.create(ExtSimplePagination.class)
            .replaceComponent(SimplePagination.class)
            .build();
}