feat: implement field filtering in FieldMenu with query support#3
Conversation
…nhance menu visibility logic
SD-529 Add Filtering to Field Menu on Double Curly Bracket Trigger
SummaryEnable field menu filtering as users type after the Tasks
NotesThe field menu component ( |
… into caio/sd-529-add-filtering-to-field-menu-on-double-curly-bracket-trigger
… into caio/sd-529-add-filtering-to-field-menu-on-double-curly-bracket-trigger
|
cursor review |
There was a problem hiding this comment.
Bug: Trigger Cleanup Fails to Remove Query Text
The trigger cleanup function captures the cursor position at trigger detection, causing it to only delete the trigger characters when executed, leaving any typed filter query text in the document. Additionally, menuTriggerFromRef.current is set to the position after the trigger, which causes incorrect menu dismissal when the cursor moves before the trigger.
src/index.tsx#L259-L267
template-builder/src/index.tsx
Lines 259 to 267 in cb74d3a
Note
Adds live query filtering to the field menu driven by trigger typing and switches DOCX export to use the editor API.
FieldMenubased on text typed aftertriggerinindex.tsx(tracks trigger start, updates query, repositions menu, resets on close/select).triggerStartand current selection.filteredFieldsandfilterQuery; render header, filter status, and “No matching fields”; display filtered list when provided.editor.exportDocx({ fileName }).FieldMenuPropsto includefilteredFieldsandfilterQuery.src/__tests__/SuperDocTemplateBuilder.test.tsxandsrc/test/setup.ts.Written by Cursor Bugbot for commit cb74d3a. This will update automatically on new commits. Configure here.