Add convenience prop to JsonInput to fire when error state changes #8022
kb-ig
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The JsonInput component has a handy feature where it displays an error state (and optionally a custom error message) if the input JSON is invalid.
I think it would be useful to add a prop to this component (e.g.
onHasErrorChanged
) which fires when the validation status changes from valid to invalid or vice versa.My use case is that I want to have a button that's clicked to process the JSON in some way, however I want to disable this button when the JSON is invalid.
The only alternative solution I can find is to use the onChange function to:
This work around is fine, but I think a convenience prop would be useful.
Beta Was this translation helpful? Give feedback.
All reactions