From afc27fabd664227f8e85c330496366849b69b75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A0Ja=CC=81n=20Mikla=CC=81s=CC=8C?= Date: Fri, 28 Feb 2025 15:43:52 +0100 Subject: [PATCH] Prevent auto refreshing MailPoet listing components when any items are selected This is to prevent losing the selected state [MAILPOET-6493] --- mailpoet/assets/js/src/listing/listing.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mailpoet/assets/js/src/listing/listing.jsx b/mailpoet/assets/js/src/listing/listing.jsx index 17098ed328..2143ae2dd7 100644 --- a/mailpoet/assets/js/src/listing/listing.jsx +++ b/mailpoet/assets/js/src/listing/listing.jsx @@ -34,7 +34,10 @@ class ListingComponent extends Component { if (autoRefresh) { jQuery(document).on('heartbeat-tick.mailpoet', () => { - this.getItems(); + // Skip auto-refresh if any items are selected for bulk editing + if (this.state.selected_ids.length === 0) { + this.getItems(); + } }); }