Skip to content

Commit

Permalink
[TASK] Replace Array.from() call with array spread
Browse files Browse the repository at this point in the history
  • Loading branch information
garbast committed Aug 14, 2024
1 parent fb6a913 commit d650fe2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Resources/Public/JavaScript/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ class ContainerToggle {
* initialize the toggle icons to open listings of nested grid container structure in the list module
*/
initializeContainerToggle() {
const containers = Array.from(document.querySelectorAll(this.containerColumnToggle));
containers.forEach(container=> {
[...document.querySelectorAll(this.containerColumnToggle)].forEach(container => {
container.addEventListener('click', event => this.toggleClicked(event));
});
}

initializeExpandColumn() {
const columnExpanders = Array.from(document.querySelectorAll(this.columnExpand));
columnExpanders.forEach(columnExpander=> {
[...document.querySelectorAll(this.columnExpand)].forEach(columnExpander => {
columnExpander.addEventListener('click', event => this.expandClicked(event));
});
}
Expand Down

0 comments on commit d650fe2

Please sign in to comment.