table icon indicating copy to clipboard operation
table copied to clipboard

fix: retain columnFiltersMeta when leaf row filtering

Open bhaugeea opened this issue 5 months ago • 1 comments

Summary by CodeRabbit

  • Bug Fixes
    • Ensures column filter metadata is correctly propagated to leaf rows during leaf-based filtering, resolving inconsistent results and missing/incorrect filter states in grouped or nested tables. Users should now see consistent filter behavior and indicators across all hierarchy levels.
  • Tests
    • No changes to public APIs.

bhaugeea avatar Aug 08 '25 20:08 bhaugeea

Walkthrough

Propagates columnFiltersMeta to newly created leaf rows in filterRowModelFromLeafs, aligning it with columnFilters during leaf-based filtering. No public API or control-flow changes.

Changes

Cohort / File(s) Change Summary
Filtering metadata propagation
packages/table-core/src/utils/filterRowsUtils.ts
When creating leaf rows in filterRowModelFromLeafs, now copies columnFiltersMeta from the source row alongside columnFilters to ensure metadata is preserved.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Table as Table Core
  participant Filter as filterRowModelFromLeafs
  participant Leaf as New Leaf Row(s)

  User->>Table: Trigger filtering
  Table->>Filter: Build row model from leafs
  rect rgb(240,248,255)
    note right of Filter: For each matched row
    Filter->>Leaf: Create new leaf row
    Filter->>Leaf: Copy columnFilters
    Filter->>Leaf: Copy columnFiltersMeta (new)
  end
  Filter-->>Table: Return filtered leaf row model
  Table-->>User: Render filtered rows

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A hop, a skip, a meta-tag in tow,
I carry filters where the leaf rows go.
Tiny bytes align, like trails in snow—
No APIs stirred, just tidy flow.
Thump-thump! says the reviewer’s heart:
“One small copy, a well-placed art.” 🐇✨

✨ Finishing Touches
  • [ ] 📝 Generate Docstrings
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Sep 08 '25 15:09 coderabbitai[bot]