Skip to content

Commit

Permalink
Update remaining references to question id to item.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jun 13, 2024
1 parent b97111a commit ec48e1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@
<template #content>
<div
v-if="isExpanded(index)"
:id="`question-panel-${question.id}`"
:ref="`question-panel-${question.id}`"
:id="`question-panel-${question.item}`"
:ref="`question-panel-${question.item}`"
:style="{ userSelect: dragActive ? 'none!important' : 'text' }"
>
<ContentRenderer
:ref="`contentRenderer-${question.id}`"
:ref="`contentRenderer-${question.item}`"
:kind="activeResourceMap[question.exercise_id].kind"
:lang="activeResourceMap[question.exercise_id].lang"
:files="activeResourceMap[question.exercise_id].files"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@
>
<KCheckbox
class="accordion-checkbox"
:checked="replacements.map(r => r.id).includes(question.id)"
:checked="replacements.map(r => r.item).includes(question.item)"
@change="() => toggleInReplacements(question)"
/>
<KButton
tabindex="0"
appearance="basic-link"
:style="accordionStyleOverrides"
class="accordion-header-label"
:aria-expanded="isExpanded(question.id)"
:aria-controls="`question-panel-${question.id}`"
:aria-expanded="isExpanded(question.item)"
:aria-controls="`question-panel-${question.item}`"
@click="toggle(index)"
>
<span>{{ title }}</span>
Expand Down Expand Up @@ -250,8 +250,8 @@
function toggleInReplacements(question) {
const replacementIds = replacements.value.map(q => q.id);
if (replacementIds.includes(question.id)) {
replacements.value = replacements.value.filter(q => q.id !== question.id);
if (replacementIds.includes(question.item)) {
replacements.value = replacements.value.filter(q => q.item !== question.item);
} else {
replacements.value.push(question);
}
Expand Down

0 comments on commit ec48e1a

Please sign in to comment.