Closed nicolasmuller closed 5 months ago
@nicolasmuller, would you prefer that when you pass in an onError
function, that the component's own error messages don't display at all?
I might have to make that an additional option, as I can both ways being useful -- you might want to perform a side effect (e.g. cancel a database transaction), but you might also want to display your own error UI elsewhere (in which case you wouldn't want the component's error message).
Hi @nicolasmuller,
I've implemented a version of this and released it as v1.12.0-rc1
. Let me know if it works for you.
Documentation here: https://www.npmjs.com/package/json-edit-react#onerror-function
Yes, I've thought about this, seems like a good idea. I'll add it to the to-do list.
I may post back here with more discussion points once I take a closer look at it.