Implement history with reverse search
Closed this issue · 1 comments
jvorcak commented
The plan is to implement history & reverse search like in a regular console.
jankoritak commented
History proposal:
General:
- Controlled-component-like history API via a new prop
API:
- A single prop
history
history
prop is of typeboolean | HistoryConfig
, whereHistoryConfig
is
interface HistoryConfig {
history: Array<string>,
onCommand: (string) => void,
}
Spec:
history
prop contains ordered FIFO queue of previous commandsonCommand
callback is triggered on every command submission, passes the new command as an argument