fix(table-block): resolve canonical tableId in filter/sort builders#4294
fix(table-block): resolve canonical tableId in filter/sort builders#4294waleedlatif1 merged 1 commit intostagingfrom
Conversation
The visual filter/sort builders read the selected tableId from subBlock id 'tableId', but the Table block stores it under 'tableSelector' (basic) or 'manualTableId' (advanced) via canonicalParamId. The lookup always returned null, so useTable was disabled and the column picker always showed "no options available". Adds useCanonicalSubBlockValue that resolves by canonicalParamId through the canonical index, mirroring the pattern used by dropdown dependsOn.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Adds Reviewed by Cursor Bugbot for commit caa42e4. Configure here. |
Greptile SummaryThis bug fix resolves a longstanding issue where the column picker in the Table block's filter and sort builders always showed "no options available" because Confidence Score: 5/5Safe to merge — targeted bug fix with no breaking changes and no P0/P1 issues found. The implementation follows established patterns (useStoreWithEqualityFn + isEqual, buildCanonicalIndex/resolveDependencyValue), handles null gracefully (useTableColumns already accepts null via ?? undefined), and the change is minimal and focused. All remaining observations are P2 or lower. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["FilterBuilder / SortBuilder\nuseCanonicalSubBlockValue(blockId, 'tableId')"] --> B["buildCanonicalIndex(blockConfig.subBlocks)"]
B --> C{canonicalId found\nfor 'tableId'?}
C -- Yes --> D["getCanonicalValues(group, blockValues)"]
D --> E["resolveCanonicalMode\n(basic or advanced?)"]
E -- basic --> F["values['tableSelector']"]
E -- advanced --> G["values['manualTableId']"]
F --> H["tableIdValue → useTableColumns"]
G --> H
C -- No --> I["values['tableId'] (undefined fallback)"]
I --> J["tableIdValue = null\n(columns stay empty)"]
H --> K["Column options populated ✓"]
Reviews (1): Last reviewed commit: "fix(table-block): resolve canonical tabl..." | Re-trigger Greptile |
Summary
'tableId', but the Table block stores the value under'tableSelector'(basic) or'manualTableId'(advanced) viacanonicalParamId— the lookup always returned null, souseTablestayed disabled and columns never loadeduseCanonicalSubBlockValuewhich resolves a value by canonicalParamId through the canonical index (same pattern dropdowns use fordependsOn), and swapped it intoFilterBuilderandSortBuilderType of Change
Testing
Tested manually — columns now populate in the Query Rows filter/sort builders and the Update/Delete by filter builder when a table is selected in either basic or advanced mode.
Checklist