Skip to content

Commit

Permalink
remove community and host email input value on uncheck (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai authored Aug 29, 2024
1 parent ec87ce4 commit e1442b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function init(component, props) {

const updateInputState = () => {
input.required = checkbox.checked;
if (!checkbox.checked) input.value = '';
};

if (checkbox && input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function prefillFields(component, props) {

contactHostEl.addEventListener('change', () => {
hostEmailEl.disabled = !contactHostEl.checked;
if (!contactHostEl.checked) hostEmailEl.value = '';
});
}
}
Expand Down

0 comments on commit e1442b3

Please sign in to comment.