I currently have a PrimeVue Sidebar component set up with a dynamic component being passed to it. At the moment, I am only using a single component to test this functionality.
<Sidebar v-model:visible="sidebarState" :baseZIndex="1000" style="width:600px;">
<component :is="this.sidebarComponent"></component>
</Sidebar>
The dynamic component is displayed correctly, and it includes some text input fields. However, I want the values entered by the user in these fields to be retained even after the sidebar is closed. Essentially, I want the typed content to persist so that users can continue where they left off when reopening the sidebar.
I attempted to wrap the component in a tag as shown below, but unfortunately, it did not achieve the desired outcome:
<Sidebar v-model:visible="sidebarState" :baseZIndex="1000" style="width:600px;">
<keep-alive>
<component :is="this.sidebarComponent"></component>
</keep-alive>
</Sidebar>
I have been struggling to make this work and would appreciate any assistance or guidance!
My setup involves Vue3, PrimeVue 3, and Vite.
Thank you,