primefaces / primefaces/primereact
DataTable: Column has "filter" then the header aligning to the the right is not working
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When you specify that the header should be aligned to the right then this is not working when you also have added the filter attribute to the column.
Reproducer
https://stackblitz.com/edit/kss27vxm-nrmpzsyy?file=src%2FApp.jsx
System Information
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 20.19.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
primereact: 10.9.6 => 10.9.6
react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
- start the project
- You see that the column header Name is not right aligned
- remove filter
- then you see that it is working again (align to the right)
Expected behavior
When you added filter or not, the column header should always be right aligned when that is specified.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproducer and compare the DataTable header with and without the column filter. Trace the header alignment behavior in the relevant DataTable entry points; done means a filtered column remains right-aligned when that alignment is specified, while the existing unfiltered behavior stays intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100