Skip to content

Commit

Permalink
Test: Fix Updating Inputs in Matching-Qst
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Feb 5, 2025
1 parent de21fa4 commit 3e30dad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,13 @@ function updateValues(droppedElement, target, source) {
value.splice(index, 1);
}
parentDefinitionInput.value = JSON.stringify(value);
return;
}
const parentDefinition = target.closest(`.${definitionElementClass}`);
const value = JSON.parse(parentDefinition.querySelector('input').value);
value.push(dropData.id);
parentDefinition.querySelector('input').value = JSON.stringify(value);
if (target.parentNode.classList.contains(targetAreasClass)) {
const parentDefinition = target.closest(`.${definitionElementClass}`);
const value = JSON.parse(parentDefinition.querySelector('input').value);
value.push(dropData.id);
parentDefinition.querySelector('input').value = JSON.stringify(value);
}
}

function changeHandler(droppedElement, target, draggedElement, source) {
Expand Down

0 comments on commit 3e30dad

Please sign in to comment.