Skip to content

add scope to onClickBefore #118

@ethaniel

Description

@ethaniel

Hello :) Would be really awesome, if I could access scope from within onClickBefore function. I would like to call scope.hideLayout();

The reason that I am asking for this is that I am cloning the way Facebook search works and I need typeahead to close the dropdown when I click on a result.

Easy fix
Replace:
scope.helper.executeCallback(scope.options.callback.onClickBefore, [scope.node, this, item, e]);
with this:
scope.helper.executeCallback(scope.options.callback.onClickBefore, [scope.node, this, item, e, scope]);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions