LT-275: Auto-focusing the search input

This commit is contained in:
Bruno Alves de Faria 2016-08-15 15:12:32 -03:00
parent 690be7492a
commit 24def018f5

View File

@ -45,8 +45,13 @@ Template.selectTree.onRendered(() => {
})).trigger('spatialChanged');
}
// Start the component transitions
Meteor.defer(() => $treeRoot.addClass('started'));
Meteor.defer(() => {
// Start the component transitions
$treeRoot.addClass('started');
// Focus the search box
$treeRoot.find('.tree-search input').focus();
});
// Update the component's viewport height
instance.updateHeight = searchTerm => {