Skip to content

Conversation

@fahrigedik
Copy link
Member

@fahrigedik fahrigedik commented Jul 1, 2025

Adds click handlers and pointer cursor styling to sortable column headers in the extensible table component. This allows users to sort columns by clicking on the header, improving table usability.

Tenants._.MyProjectName.mp4

Description

Resolves #22928

Enhances the extensible table component by making sortable column headers fully clickable. Previously, users could only sort columns by clicking on the sort icons, but now they can click anywhere on the header text to trigger sorting.

Changes Made:

  • Added let-sortFn="sortFn" parameter to ngx-datatable-header-template to access the sorting function
  • Implemented click handlers (click)="prop.sortable && sortFn(column)" for both tooltip and non-tooltip headers
  • Added conditional pointer cursor styling [class.pointer]="prop.sortable" using existing CSS class pattern
  • Maintained consistency with existing codebase patterns (used [class.pointer] instead of inline styles)

Benefits:

  • Improved user experience - larger clickable area for sorting
  • Consistent with standard table UI patterns
  • Better accessibility for users
  • No breaking changes to existing functionality

Checklist

  • I fully tested it as developer / designer and created unit / integration tests
  • I documented it (or no need to document or I will create a separate documentation issue)

How to test it?

  1. Navigate to any page that uses the extensible table component (e.g., Identity Management, Tenant Management)
  2. Verify that sortable column headers show a pointer cursor when hovering
  3. Click on any sortable column header text (not just the sort icon) and verify that sorting is triggered
  4. Test both ascending and descending sort by clicking the same header multiple times
  5. Verify that non-sortable columns do not show pointer cursor and do not respond to clicks
  6. Test headers with tooltips to ensure tooltip functionality still works alongside sorting

Adds click handlers and pointer cursor styling to sortable column headers in the extensible table component. This allows users to sort columns by clicking on the header, improving table usability.
@sumeyyeKurtulus sumeyyeKurtulus changed the title Enable column header click sorting in extensible table - issue 22928 Angular - Enable column header click sorting in extensible table Jul 2, 2025
@sumeyyeKurtulus sumeyyeKurtulus added this to the 10.0-preview milestone Jul 2, 2025
@gizemmutukurt gizemmutukurt requested review from oykuermann and removed request for gizemmutukurt July 2, 2025 06:10
@oykuermann oykuermann merged commit 9d2ebb8 into dev Jul 2, 2025
2 of 4 checks passed
@oykuermann oykuermann deleted the issue-22928 branch July 2, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular - When the column is clicked, sorting should be done.

4 participants