-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add destroy method #59
Add destroy method #59
Conversation
.on('mouseleave', this._handleMouseleave) | ||
.on('mouseover', '.tt-suggestions > .tt-suggestion', this._handleMouseover) | ||
.on('click', '.tt-suggestions > .tt-suggestion', this._handleSelection); | ||
.on('mouseenter.tt', this._handleMouseenter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a suffix instead of a prefix? Does this.$menu.off('.tt');
not work with prefixes? Just curious because I haven't seen this before…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the link.
Looks good. Do you think this is worth testing if we can only test each individual destroy method and not the whole? |
I was going to use this to start a little integration test suite... we'll see how that goes. |
Sounds good. Would that be something that could run in Travis? |
Yeah, it'd still be written using Jasmine. Basically I would just initialize typeaheads and inspect some properties to make sure things are as expected. It'd be pretty dumb, but it'd probably be useful to have. |
Eh might hold off on the integration tests, for now I just added some unit tests. |
This will allow typeaheads to be reinitialized:
I need to add some tests, but the code should be good to go. It'll fix #41.
Also, I fixed a bug that prevented the undocumented
ttl_ms
option from being set to0
.