Open wDevil opened 10 years ago
The only time you need to destroy and create again is if the schema or any options change. Otherwise, you can just use setValue
.
examples/advanced.html
has a restore button that I think behaves how you're asking - https://github.com/jdorn/json-editor/blob/master/examples/advanced.html#L99
+1
may be a new reset method is a good idea
@jdorn
using setValue() for reset the form
editor.setValue({})
OR
editor.setValue('')
OR
editor.setValue(null)
cause destroy of form :(
maybe add clear() method?