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

onInput prompt can be 0 #47

Closed
romulorod opened this issue Nov 21, 2023 · 1 comment
Closed

onInput prompt can be 0 #47

romulorod opened this issue Nov 21, 2023 · 1 comment

Comments

@romulorod
Copy link
Contributor

romulorod commented Nov 21, 2023

Describe the bug
When using the component, the onInput can be set to 0 from the client usage, even though it errors saying that it should be a callback function, its possible to, at least in dev mode, display the 0 in terminal as visible in the attached screenshot.

To Reproduce
pass 0 to onInput prop when rendering

Expected behavior
The short-circuit verification on the lib should check if onInput is indeed a function to prevent this from happening.

Screenshots
image

Additional context
Add any other context about the problem here.

Copy link

Thank you for taking the time to submit an Issue!
You should get a response to this issue within one to two days.

romulorod added a commit to romulorod/react-terminal-ui that referenced this issue Nov 21, 2023
jonmbake added a commit that referenced this issue Nov 23, 2023
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