<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: San103</title>
    <description>The latest articles on DEV Community by San103 (@san103).</description>
    <link>https://dev.to/san103</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1089183%2F495665c5-8bff-4bc3-9875-6ef9dea1ac4b.jpeg</url>
      <title>DEV Community: San103</title>
      <link>https://dev.to/san103</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/san103"/>
    <language>en</language>
    <item>
      <title>Need help Inertia Vue Developer, this.$inertia.form</title>
      <dc:creator>San103</dc:creator>
      <pubDate>Thu, 25 May 2023 06:35:21 +0000</pubDate>
      <link>https://dev.to/san103/hi-inertia-vue-developer-need-help-please-246c</link>
      <guid>https://dev.to/san103/hi-inertia-vue-developer-need-help-please-246c</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mzDRgzW0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8pavh1317sogt7xodnvh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mzDRgzW0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8pavh1317sogt7xodnvh.PNG" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good day programmers. I just wanna ask for help about my inertia vue 3 project little bit of typeScript. I have a create and update button with modal, now I made just one form(modal) for both of them and I use this.$inertia.form for storing and retrieving data, now my problem is that I cant seem to reset the form whenever I close the modal when I go first in editModal(display data) to createModal()- It still displayed the data in createModal() form, I tried the this.form.reset() in closeModal function but doesnt work. I know its kinda basic for you guys this kinda problem but I appreciate your answer Thanks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data(){
    form: this.$inertia.form({
                firstName: '',
                lastName: '',
                gender: 'Male',

            })}

methods:{
       editModal(rider: Rider) {

            this.form = this.$inertia.form(rider);

            //when assigning this.form to rider object, it cannot 
        be reset!
            this.showModal = true;

            this.editMode = true;
        },
        createModal(){
            this.showModal = true;
        },

        closeModal() {
            this.showModal = false;
            this.editMode = false;
            this.form.reset();

        },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>laravel</category>
      <category>inertia</category>
      <category>vue</category>
    </item>
  </channel>
</rss>
