From 44b5e3e6a47d02441656e71d9240a645bad06294 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Tue, 4 Jan 2022 18:44:55 +0100 Subject: [PATCH] Insert answer into list after submitting --- app/javascript/retrospring/features/question/answer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/retrospring/features/question/answer.ts b/app/javascript/retrospring/features/question/answer.ts index 98a5ce58..407b66eb 100644 --- a/app/javascript/retrospring/features/question/answer.ts +++ b/app/javascript/retrospring/features/question/answer.ts @@ -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) => {