From ca259c767a558758353ef8dab7eb3e5205ff0129 Mon Sep 17 00:00:00 2001 From: Smith Date: Fri, 23 Feb 2024 16:53:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/events-filters.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/events-filters.js b/public/events-filters.js index c20da26..4c8a7e4 100644 --- a/public/events-filters.js +++ b/public/events-filters.js @@ -138,7 +138,9 @@ function init_events_filters(entities, sides) { function update_filters_dataset(update_events) { if (!entity_ss || !event_ss) return; - const entity_ss_value = entity_ss.getSelected(); + const entity_ss_value = entity_ss.getSelected().map(e => { + return e === 'null' ? '' : e; + }); const event_ss_value = event_ss.getSelected(); const events_num = []; @@ -157,9 +159,8 @@ function init_events_filters(entities, sides) { const rules = []; if (entity_ss_value.length > 0) { for (const entity_id of entity_ss_value) { - const id = entity_id === 'null' ? '' : entity_id; - rules.push('#events-table tbody tr[data-event-name="' + ev + '"][data-attacker-id="' + id + '"]'); - rules.push('#events-table tbody tr[data-event-name="' + ev + '"][data-victim-id="' + id + '"]'); + rules.push('#events-table tbody tr[data-event-name="' + ev + '"][data-attacker-id="' + entity_id + '"]'); + rules.push('#events-table tbody tr[data-event-name="' + ev + '"][data-victim-id="' + entity_id + '"]'); } } else { rules.push('#events-table tbody tr[data-event-name="' + ev + '"]');