Skip to content

fab-people-picker resolveSuggestions callback gets invoked with the incorrect scope #213

@nmallick1

Description

@nmallick1

I am using the fab-people-picker component and have attached a callback to resolveSuggestions. When the callback is invoked, the this pointer points to the fab-people-picker component instead of pointing to the container (i.e.. my component where the fab-people-picker is added).

This is a screenshot of the this pointer when resolveSuggestions callback is invoked.
image

Same's the case with any callback that is provided as an input to the component, e.g.. selectedItems callback

I tried to get around this by binding my method to (onResolveSuggestions)="AuthorPickerInputChanged($event)" however as expected, the $event is empty, however the this variable is correct and points to my component.

I need this to point to my component so that I can use the injected services to actually resolve the suggestions.

Any suggestions on how I can get this to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions