Insert answer into list after submitting

This commit is contained in:
Andreas Nedbal 2022-01-04 18:44:55 +01:00 committed by Andreas Nedbal
parent 721b7f3657
commit 44b5e3e6a4
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ export function questionAnswerHandler(event: Event): void {
}
showNotification(data.message);
document.querySelector('div#answers').insertAdjacentHTML('afterbegin', data.render);
document.querySelector('div#q-answer-box').remove();
},
error: (data, status, xhr) => {