Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement history with reverse search #3

Closed
jvorcak opened this issue Dec 7, 2018 · 1 comment
Closed

Implement history with reverse search #3

jvorcak opened this issue Dec 7, 2018 · 1 comment

Comments

@jvorcak
Copy link
Member

jvorcak commented Dec 7, 2018

The plan is to implement history & reverse search like in a regular console.

@jankoritak
Copy link
Member

History proposal:

General:

  • Controlled-component-like history API via a new prop

API:

  • A single prop history
  • history prop is of type boolean | HistoryConfig, where HistoryConfig is
interface HistoryConfig {
  history: Array<string>,
  onCommand: (string) => void, 
}

Spec:

  • history prop contains ordered FIFO queue of previous commands
  • onCommand callback is triggered on every command submission, passes the new command as an argument

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

No branches or pull requests

2 participants