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?
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:
- Extend SimplePagination
public class ExtSimplePagination extends SimplePagination {
@Override
protected void updateTotalCountLabel() {
Integer totalCount = ... // load total count
getTotalCountLabel().setText(String.valueOf(totalCount));
getTotalCountLabel().setEnabled(false);
}
}
- Register your extension:
@Bean
public ComponentRegistration extSimplePagination() {
return ComponentRegistrationBuilder.create(ExtSimplePagination.class)
.replaceComponent(SimplePagination.class)
.build();
}