akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

NbSortHeaderComponent fires sort event twice #3059

Open alomardev opened 2 years ago

alomardev commented 2 years ago

Issue type

Issue description

Current behavior: NbSortHeaderComponent fires sort event twice. The event is fired by two different click event listeners.

Expected behavior: NbSortHeaderComponent shall listen to click event only once.

Steps to reproduce:

  1. Use nbSort directive on an nbTreeGrid component
  2. Apply the (sort) event on the element
  3. Log each call in the passed method

Related code: Issue illustrated in this repo.

Other information:

Environment

Browsers:       Firefox, Edge
---
Angular CLI:    13.3.4
Node:           16.13.1
npm:            8.8.0
OS:             win32 x64
---
Angular:        13.3.5
@nebular/theme: 9.0.2
barkofdelight commented 1 year ago

Workaround:

::ng-deep button.nb-tree-grid-header-change-sort-button {
    pointer-events: none;
}

(Bleh.)