You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In DataTable component, If column has dynamic field, it doesn't show the filter option in overlay panel (filterDisplay="menu" in datatable.)
If we do not modify the field property, it works.
I see that if you have the default value of _filter as true then it doesn't happen: const [_filter, showFilter] = useState(true); so I suggest you change the initial value to true and you call useEffect(() => {showFilter(false)}, []) so it flip back to no filter.
So their is a bug (Needs triage can be removed). It seems that a value is computed in a effect and never again.
However this seems strange how you want your dynamic columns. In the example it show you just iterate over columns descriptors and it display just fine. Why can't you do like the example ?
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Sep 7, 2024
Describe the bug
In DataTable component, If column has dynamic field, it doesn't show the filter option in overlay panel (filterDisplay="menu" in datatable.)
If we do not modify the field property, it works.
Reproducer
https://stackblitz.com/edit/qiryzj-py9pqx?file=src%2FApp.jsx
PrimeReact version
10.6.5
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
On filter icon, even if field changes, it should show the filter options in overlay panel.
The text was updated successfully, but these errors were encountered: