From 069fefbe36edca7203d3215bdd3d76868d9402fd Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat, 10 Feb 2024 13:23:16 +0000 Subject: [PATCH] Linting --- .../components/dropdowns/overflow-button.js | 5 +++-- war/src/main/js/components/dropdowns/utils.js | 20 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/war/src/main/js/components/dropdowns/overflow-button.js b/war/src/main/js/components/dropdowns/overflow-button.js index 143edd3c4650..023f372d839e 100644 --- a/war/src/main/js/components/dropdowns/overflow-button.js +++ b/war/src/main/js/components/dropdowns/overflow-button.js @@ -11,12 +11,13 @@ function init() { 1000, (element) => { Utils.generateDropdown(element, (instance) => { - const elements = element.nextElementSibling.content.children[0].children; + const elements = + element.nextElementSibling.content.children[0].children; const mappedItems = Utils.convertHtmlToItems(elements); instance.setContent(Utils.generateDropdownItems(mappedItems)); }); - } + }, ); } diff --git a/war/src/main/js/components/dropdowns/utils.js b/war/src/main/js/components/dropdowns/utils.js index 549ddd3d9c09..fb2b1a3a7b11 100644 --- a/war/src/main/js/components/dropdowns/utils.js +++ b/war/src/main/js/components/dropdowns/utils.js @@ -142,7 +142,7 @@ function generateDropdownItems(items, compact) { function convertHtmlToItems(children) { const items = []; - Array.from(children).forEach(child => { + Array.from(children).forEach((child) => { const attributes = child.dataset; const type = child.dataset.dropdownType; @@ -152,7 +152,7 @@ function convertHtmlToItems(children) { label: attributes.dropdownText, id: attributes.dropdownId, icon: attributes.dropdownIcon, - iconXml: attributes.dropdownIcon + iconXml: attributes.dropdownIcon, }; if (attributes.dropdownHref) { @@ -165,15 +165,13 @@ function convertHtmlToItems(children) { items.push(item); break; case "SUBMENU": - items.push( - { - type: "ITEM", - label: attributes.dropdownText, - icon: attributes.dropdownIcon, - iconXml: attributes.dropdownIcon, - subMenu: () => convertHtmlToItems(child.content.children) - } - ); + items.push({ + type: "ITEM", + label: attributes.dropdownText, + icon: attributes.dropdownIcon, + iconXml: attributes.dropdownIcon, + subMenu: () => convertHtmlToItems(child.content.children), + }); break; case "SEPARATOR": items.push({ type: type });