Skip to content
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

Click on mention item show list #19

Open
komxvl opened this issue Nov 6, 2019 · 6 comments
Open

Click on mention item show list #19

komxvl opened this issue Nov 6, 2019 · 6 comments

Comments

@komxvl
Copy link

komxvl commented Nov 6, 2019

It is possible to show tribute-container when I click on @foo mention item?

@agarbund
Copy link
Contributor

agarbund commented Nov 6, 2019 via email

@komxvl
Copy link
Author

komxvl commented Nov 6, 2019

Something like this

@agarbund
Copy link
Contributor

Sry for the late reply.

It seems possible but not straightforward. You'd need to detect clicking on a mention by yourself and then call showMenuForCollection ( example ).

This is how you'd open the menu programmatically:

@Component({
    template: `<textarea [ngxTribute]="options" #tributeDirective="ngx-tribute" #ref></textarea>`
})
export class TributeComponent {
    @ViewChild('tributeDirective') tributeDirective: NgxTributeDirective<any>;
    @ViewChild('ref') el: ElementRef;
    
    showMenu() {
        this.tributeDirective.tribute.showMenuForCollection(this.el.nativeElement);
    }
}

You need to figure out by yourself when to call showMenu() thou.

@agarbund agarbund closed this as completed Jan 3, 2020
@komxvl
Copy link
Author

komxvl commented Jan 3, 2020

Could you help me, please? I want to create a stackblitz with this issue, but I get an error, but locally everything working fine. https://stackblitz.com/edit/angular-kcwsup

@agarbund agarbund reopened this Jan 8, 2020
@agarbund
Copy link
Contributor

agarbund commented Jan 8, 2020

I don't know what the issue with Stackblitz is, tried to create a new project and it gives me the same error when installing this package. Can you just create a Github repo with your issue and link it here?

@komxvl
Copy link
Author

komxvl commented Jan 9, 2020

Thanks for your answer, I created a repository with some issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants