Skip to content

Feature/history navigation#63

Merged
jonmbake merged 3 commits into
jonmbake:masterfrom
leonardo3130:feature/history-navigation
Nov 28, 2025
Merged

Feature/history navigation#63
jonmbake merged 3 commits into
jonmbake:masterfrom
leonardo3130:feature/history-navigation

Conversation

@leonardo3130

@leonardo3130 leonardo3130 commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Fixes #35

  • implementation of history navigation with up and down arrow keys
  • local storage for terminal history persistency
  • some tests for the component's new functionalities

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking the time to submit a Pull Request!
Please ensure the pull request is linked to an issue by using the commit format Fixes <Issue #> - .

Comment thread src/index.tsx
@jonmbake jonmbake merged commit 2008b8c into jonmbake:master Nov 28, 2025
3 checks passed
Comment thread src/index.tsx

const handleInputKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
if(!onInput) {
event.preventDefault();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leonardo3130 Was this added on purpose? Looks like it broke entering chars w/i terminal.

@leonardo3130 leonardo3130 Nov 28, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my fault. It wanted e.preventDefault() to run only for Arrow keys, somehow i put it in the wrong place.
Can I remove it from there and put it at the correct place?

I didn't find instructions on how to try the component locally, so I relied on tests. I am sorry

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I solved the issue by doing event.preventDefault(); only arrow keys and enter. Let me know if you want me to submit a PR. Before submitting I'd prefer to understand how to run the demo locally (if possible).

I think this would be also a good information to put in the README file.

@leonardo3130 leonardo3130 mentioned this pull request Nov 28, 2025
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.

Add support for up/down arrows to toggle through history

2 participants