primefaces / primefaces/primereact
DataTable: Bad position of match mode filter menu when Portals is deactivated
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
By deactivating Portals with <PrimeReactProvider value={{ appendTo: "self" }} > surronding datatable, the filter match mode menu of basic filter is positionned on the top-left of the table.
I set the css with .p-column-filter-row { position: relative; }, but there are 2 problems:
- with few rows in the table, the end of the menu is hidden after the wrapper's bottom border
- with
resizableColumns={true}, after resizing the column, the menu disappears behind tbody
How can I have Portals deactivated and the menu with the same behavior as when Portals is activated?
Reproducer
https://codesandbox.io/s/primereact-demo-forked-w4rswy?file=/src/App.js:6580-6596
PrimeReact version
10.0.9
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome 118
Steps to reproduce the behavior
- Go in https://codesandbox.io/s/primereact-demo-forked-w4rswy?file=/src/App.js:6580-6596
- Click on the filter button of a column => the menu is on the top-left
- Uncomment
.p-column-filter-row { position: relative; }l. 22->24 in style.css and click on the filter button of a column => the bottom of the menu is hidden - Uncomment
resizableColumnsl. 233 in App.js and click on the filter button of a column => the menu is hidden behind tbody
Expected behavior
The filter menu should be correctly displayed when Portals is deactivated
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 CodeSandbox, especially App.js around the DataTable and style.css around the .p-column-filter-row rule, and reproduce the menu behavior with appendTo set to self. Trace the DataTable filter menu positioning and stacking behavior, including resizableColumns. Done means the menu remains correctly positioned and visible without portals in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100