From 2fb1b19e09f8d020903580799b1e4403944579cf Mon Sep 17 00:00:00 2001 From: Nicolas Bouilleaud Date: Wed, 10 Apr 2019 10:32:43 +0200 Subject: [PATCH] Hide other motivation fields when switching between states --- app/javascript/new_design/state-button.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/new_design/state-button.js b/app/javascript/new_design/state-button.js index da47340fd..c30fa64a2 100644 --- a/app/javascript/new_design/state-button.js +++ b/app/javascript/new_design/state-button.js @@ -2,6 +2,7 @@ import { show, hide } from '@utils'; export function showMotivation(event, state) { event.preventDefault(); + motivationCancel(); show(document.querySelector(`.motivation.${state}`)); hide(document.querySelector('.dropdown-items')); }