gregnb / gregnb/mui-datatables

Adding custom components to column header span after sort

Open
#1,989 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

I am looking for a way to add a custom component after the sort icon outside of the button. I think it would be beneficial to add a prop that would allow for injection of such components.

![image](https://user-images.githubusercontent.com/88386722/213316218-43795654-6054-4e0d-b3ef-9cdeac89d44f.png)

This is a decent amount of dead space which could be used for column specific actions like having a button for opening a modal for search or filter.

It would be easier then having to build a whole new header using what is already available.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the column-header rendering entry point and trace how the sort icon and button are assembled. Define the component-injection behavior requested in the issue, including placement outside the button, then add coverage showing that a custom component renders after sorting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.