Prevent auto refreshing MailPoet listing components when any items are selected

This is to prevent losing the selected state

[MAILPOET-6493]
This commit is contained in:
 Ján Mikláš
2025-02-28 15:43:52 +01:00
committed by Ján Mikláš
parent c57844cb05
commit afc27fabd6

View File

@ -34,7 +34,10 @@ class ListingComponent extends Component {
if (autoRefresh) {
jQuery(document).on('heartbeat-tick.mailpoet', () => {
// Skip auto-refresh if any items are selected for bulk editing
if (this.state.selected_ids.length === 0) {
this.getItems();
}
});
}