From c17f9b2db468567eca19faabd242ebbf9a7ea2e7 Mon Sep 17 00:00:00 2001 From: Antonio <34042064+Desvelao@users.noreply.github.com> Date: Tue, 10 Jan 2023 13:42:48 +0100 Subject: [PATCH] Fix error when clicking on the multiple agent selector (#5094) * fix(): fix console error when clicking in multiple agents selector * changelog: add entry Co-authored-by: Federico Rodriguez (cherry picked from commit c10704529b4351e3d8b2fe7fed0c8b35734e53d9) --- CHANGELOG.md | 1 + public/components/management/groups/multiple-agent-selector.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 537c78d203..c8c80adb90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ All notable changes to the Wazuh app project will be documented in this file. - A solaris command has been fixed [5035](https://github.com/wazuh/wazuh-kibana-app/pull/5035) - Fixed commands: Aix, OpenSUSE, Alpine, Suse11, Fedora, HP, Oracle Linux 5, Amazon Linux 2, Centos5. Changed the word 'or higher' in buttons to '+'.Fixed validations for Hp, Solaris and Alpine. [5045](https://github.com/wazuh/wazuh-kibana-app/pull/5045) - Fixed error in Github module PDF report. [5069](https://github.com/wazuh/wazuh-kibana-app/pull/5069) +- Fixed error when clicking on the selectors of agents in the group agents management [#5094](https://github.com/wazuh/wazuh-kibana-app/pull/5094) ### Removed diff --git a/public/components/management/groups/multiple-agent-selector.tsx b/public/components/management/groups/multiple-agent-selector.tsx index 5846df0cef..89d6cc13cb 100644 --- a/public/components/management/groups/multiple-agent-selector.tsx +++ b/public/components/management/groups/multiple-agent-selector.tsx @@ -396,7 +396,7 @@ export const MultipleAgentSelector = withErrorBoundary( }; unselectElementsOfSelectByID(containerID) { - document.getElementById(containerID).options.forEach((option) => { + Array.from(document.getElementById(containerID).options).forEach((option) => { option.selected = false; }); }