Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(TD-123): Enhance Form Handling Support All Input Types #403

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nabute
Copy link
Contributor

@Nabute Nabute commented Jun 26, 2024

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behaviour? (You can also link to an open issue here)

What is the new behaviour? (You can also link to the ticket here)

Does this PR introduce a breaking change?

Screenshots (If appropriate)

@SallaDev SallaDev marked this pull request as draft June 26, 2024 11:06
@@ -24,7 +24,7 @@

initProductOptionValidations() {
document.querySelector('.product-form')?.addEventListener('change', function(){
this.reportValidity() && salla.product.getPrice(new FormData(this));
[...this.querySelectorAll('[required]')].some(input => input.value.trim() === '') && salla.product.getPrice(new FormData(this));
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Expected parentheses around arrow function argument.

Suggested change
[...this.querySelectorAll('[required]')].some(input => input.value.trim() === '') && salla.product.getPrice(new FormData(this));
[...this.querySelectorAll('[required]')].some((input) => input.value.trim() === '') && salla.product.getPrice(new FormData(this));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant