Skip to content

Add onDone support for TextView, InputField, and Table (Issue #5)#19

Merged
cassdeckard merged 1 commit intomainfrom
fix/ondone-enter-simplify
Mar 2, 2026
Merged

Add onDone support for TextView, InputField, and Table (Issue #5)#19
cassdeckard merged 1 commit intomainfrom
fix/ondone-enter-simplify

Conversation

@cassdeckard
Copy link
Owner

Adds onDone support (SetDoneFunc) for TextView, InputField, and Table so a template callback runs when the user presses Enter or Escape.

Changes

  • Add OnDone to config.Primitive and config.PageConfig
  • SetDoneFunc handlers for Enter/Escape on TextView, InputField, Table
  • ondone-demo.yaml example page; navigation acceptance test
  • Docs: tview-coverage.md, issue-dependencies.md

Implementation

Simple SetDoneFunc-only implementation; relies on tview calling done for Enter/Escape. Escape returns to main via global key binding.

Note: tview's Table does not call SetDoneFunc for Enter when rows are selectable (Enter is used for selection). Escape still triggers onDone on selectable tables.

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Test Results

243 tests  ±0   243 ✅ ±0   0s ⏱️ ±0s
  5 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit f3b1660. ± Comparison against base commit 95f7c9d.

♻️ This comment has been updated with latest results.

@cassdeckard cassdeckard force-pushed the fix/ondone-enter-simplify branch from 9783607 to 53e3760 Compare March 2, 2026 05:14
- Add OnDone to config.Primitive and config.PageConfig
- SetDoneFunc handlers for Enter/Escape on TextView, InputField, Table
- ondone-demo.yaml example page; navigation test
- Docs: tview-coverage.md, issue-dependencies.md

Simple SetDoneFunc-only implementation; relies on tview calling done for
Enter/Escape. Escape works via global binding. Table: note that tview
does not call SetDoneFunc for Enter when rows are selectable.

Made-with: Cursor
@cassdeckard cassdeckard force-pushed the fix/ondone-enter-simplify branch from 53e3760 to f3b1660 Compare March 2, 2026 05:29
@cassdeckard cassdeckard merged commit d06bc34 into main Mar 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant