From e66eb1a0cf13b06e5f456bb32aac49bc3de403c2 Mon Sep 17 00:00:00 2001 From: Bruno Alves de Faria Date: Mon, 15 Aug 2016 16:45:30 -0300 Subject: [PATCH] LT-275: Hiding common section after typing on search input --- .../client/components/bootstrap/input/selectTree.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Packages/ohif-core/client/components/bootstrap/input/selectTree.js b/Packages/ohif-core/client/components/bootstrap/input/selectTree.js index e5364ffb4..9fa7a776c 100644 --- a/Packages/ohif-core/client/components/bootstrap/input/selectTree.js +++ b/Packages/ohif-core/client/components/bootstrap/input/selectTree.js @@ -134,8 +134,14 @@ Template.selectTree.events({ }, 'input .tree-search input'(event, instance) { + // Get the tree root + const $treeRoot = $(event.currentTarget).closest('.select-tree-root'); + // Change the search term to update the tree items instance.searchTerm.set($(event.currentTarget).val()); + + // Change the component state + $treeRoot.addClass('interacted'); }, 'change .select-tree:first>.tree-content>.tree-options>.tree-inputs>label>input'(event, instance) {