Skip to content

Update disable-element.js to allow for multiple elements to be selected#1639

Closed
imaperson1060 wants to merge 1 commit intobigskysoftware:masterfrom
imaperson1060:patch-1
Closed

Update disable-element.js to allow for multiple elements to be selected#1639
imaperson1060 wants to merge 1 commit intobigskysoftware:masterfrom
imaperson1060:patch-1

Conversation

@imaperson1060
Copy link
Copy Markdown
Contributor

Allow selection of multiple elements for toggling

Allow selection of multiple elements for toggling
Copy link
Copy Markdown
Collaborator

@alexpetros alexpetros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a multiple-element test please? Otherwise looks looks good

} else if (name == "htmx:afterRequest" && targetElement) {
targetElement.disabled = false;
}
targetElements.forEach(targetElement => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use forEach because it's not IE11 compatible.

@alexpetros alexpetros added the enhancement New feature or request label Jul 30, 2023
@alexpetros
Copy link
Copy Markdown
Collaborator

Ah it looks like it broke the existing test too. You can run npm run test locally, using node 15

@imaperson1060
Copy link
Copy Markdown
Contributor Author

imaperson1060 commented Jul 30, 2023

Ah it looks like it broke the existing test too. You can run npm run test locally, using node 15

I'll make a new PR following the contributing guide (which I may have forgotten to read last time).

#1650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants