json-edit-react icon indicating copy to clipboard operation
json-edit-react copied to clipboard

Support promises for callbacks like onDelete

Open CarlosNZ opened this issue 5 months ago • 4 comments

Discussed in https://github.com/CarlosNZ/json-edit-react/discussions/116

Originally posted by yaswanthmaddula-sureify September 5, 2024 I would like to have confirmation modal, if user tries to delete certain important keys in the json. As the onDelete callback is synchronous as of now, the only way for me to achieve this is using window.confirm(). It would be useful if there is a way like promises to support such usecases.

CarlosNZ avatar Sep 04 '24 22:09 CarlosNZ