-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
area: componentsRelated to the React componentsRelated to the React componentsbugSomething isn't workingSomething isn't workingcomponent: quick-filter-dropdownQuickFilterDropdown componentQuickFilterDropdown componentpriority: mediumNormal priorityNormal prioritystatus: needs-triageNew issue awaiting evaluationNew issue awaiting evaluation
Description
Description
When switching between Client-Side and Server-Side demo tabs, the QuickFilterDropdown component throws errors trying to access undefined filter properties.
Error
[QuickFilterDropdown] Error getting active filters: TypeError: Cannot read properties of undefined (reading 'category')
at filterModelBuilder.ts:106:32
at Array.find (<anonymous>)
at getActiveFilterOption (filterModelBuilder.ts:175:15)
at index.tsx:64:30
Steps to Reproduce
- Go to the demo page at /demo
- Click on "Server-Side Data" tab
- Click back on "Client-Side Data" tab
- Check browser console for errors
Expected Behavior
No errors should occur when switching between tabs. The QuickFilterDropdown should handle grid instance changes gracefully.
Possible Causes
- Grid API references not being cleaned up properly when switching tabs
- QuickFilterDropdown trying to access filters before new grid is initialized
- Missing cleanup in useEffect hooks when component unmounts
- Grid instances might be sharing state between tabs
Suggested Fix
- Add proper cleanup when grid is destroyed
- Check if grid API is valid before accessing filter model
- Consider using a key prop on grid components to force full remount
- Add null checks in filterModelBuilder.ts before accessing filter properties
Context
Found while working on the v2 headless components refactor in PR for feat/v2-headless-components branch.
Metadata
Metadata
Assignees
Labels
area: componentsRelated to the React componentsRelated to the React componentsbugSomething isn't workingSomething isn't workingcomponent: quick-filter-dropdownQuickFilterDropdown componentQuickFilterDropdown componentpriority: mediumNormal priorityNormal prioritystatus: needs-triageNew issue awaiting evaluationNew issue awaiting evaluation
Projects
Status
✅ Done