radio4000 / components

web-components to build the r4 interfaces, uses the sdk
https://components.radio4000.com/
1 stars 0 forks source link

Reset form state after submit #182

Closed oskarrough closed 1 month ago

oskarrough commented 1 month ago

A fix for https://github.com/radio4000/components/issues/181

I tested on http://localhost:4000/examples/r4-track-create. The issue was in resetting the form "state" after submit. We did this.$form.reset(), but this only clears the values of the input fields. It doesn't touch internal state. So the URL-auto-filler thought it had a title, and wouldn't request a new one.

This PR properly clears the url + title after submit.