Added support for custom events to typeahead config