oruga
oruga copied to clipboard
Getting destroyOnHide prop for Modal to work
Overview of the problem
Oruga version: [0.4.7] Vuejs version: [3.2.19] OS/Browser: Windows 10 64 bit/Firefox
Description
Modal's destroyOnHide prop doesn't seem to work
Steps to reproduce
- Programmatically call a modal with form and state like so:
oruga.modal.open({
autoFocus: true,
component: FormComponent,
destroyOnHide: false,
});
- Type anything into a form
- Close modal in
FormComponentusingemit('close'); - Reopen modal
- Form fields in
FormComponentare empty.
Expected behavior
For the Form fields in FormComponent to have the text persisted
Actual behavior
It seems that the Oruga modal is destroyed and renewed every time it's called, even with destroyOnHide: false in its config object.
At the moment that prop works only with modal by tag and not programmatically