How to reset form fields in a grafana/ui Form


Does any one have an example on how to reset form fields in a @grafana/ui Form? I tried various ways but could not get it to work. There is no doc on this topic and I am mostly following the doc from react-hook-form. Here is a link to the sandbox code example: wonderful-blackburn-exho5 - CodeSandbox

Any help is appreciated.


At first glance, it looks like the code is trying to reset to defaultRelease which has an empty project property rather than an undefined one.

Does it work if you change:

const defaultRelease: ReleaseDTO = {
  project: ""


const defaultRelease: ReleaseDTO = {
  project: undefined,