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

Support for providing commands to run from external source #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AmbientLion
Copy link

I've implemented a minor, but useful enhancement to react-console, which allows an input command to be provided from an external source, through a new public method "handleInput(commandText:string)". This makes it possible to do things like add other input elements (e.g. button, anchor) that when interacted with run a command. It also makes it possible to "script" a sequence of inputs, without requiring user interaction.

To the extent possible, I have preserved the existing structure and style of the original code. There were not existing automated unit tests to update for this project, but I've tested this manually with a variety of use cases and to ensure that existing behavior continues to work as expected. No changes to the props/state of the ReactConsole component were needed. The new functionality works with existing history mechanisms as well as input validation.

@AmbientLion AmbientLion changed the title Support from providing commands to run from external source Support for providing commands to run from external source Apr 7, 2021
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