LT-275: Hiding common section after typing on search input

This commit is contained in:
Bruno Alves de Faria 2016-08-15 16:45:30 -03:00
parent a2c8d0627e
commit e66eb1a0cf

View File

@ -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) {