Meteor-Community-Packages / meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
https://atmospherejs.com/mizzao/autocomplete
MIT License
350 stars 109 forks source link

How do you bind event handlers? #102

Closed dfischer closed 3 years ago

dfischer commented 9 years ago

How would you bind event handlers to the text area?

I.e

 {{> inputAutocomplete settings=settings id="msg" class="input-xlarge" placeholder="Chat..." data-action="doSomething"}}
Template.foo.events({
  'keyup data-action=doSomething': function() {
    alert('hi');
  }
});

Seems like this isn't possible? Not sure how you'd do anything with a textarea on submitting anything unless this was possible?

mizzao commented 9 years ago

That should work as you have it, except for the syntax problem: 'keyup input[data-action="doSomething"]'

Also check out the autocompleteselect event descrbed in the docs.