Custom click directive stoped working
Closed this issue · 6 comments
eugene-gv commented
Added custom directive:
@Directive({
selector: '[ngxSelectMultiClear]'
})
export class NgxSelectMultiClearDirective {
@Output() ngxSelectMultiClear = new EventEmitter();
@HostListener('click', ['$event'])
onClick(event) {
console.log(event)
}
}
In template:
<ngx-select (ngxSelectMultiClear)="customFunc()"
...
></ngx-select>
On click - nothing happens. In 3.6.10 and previous works fine
optimistex commented
@eugene-gv Please, reproduce the issue within an example.
Make fork from that: https://stackblitz.com/edit/ngx-select-ex-scratch
eugene-gv commented
There is integrated clear button, so no need in such directive, sorry.
But custom click on selected option don't work anyway.
check here: https://stackblitz.com/edit/ngx-select-ex-scratch-btus6p
optimistex commented
@eugene-gv
It works with a fix in your code:
https://stackblitz.com/edit/ngx-select-ex-issue-166?file=src%2Fapp%2Fapp.component.html
eugene-gv commented
optimistex commented
eugene-gv commented
Thanks, Konstantin!