title: Ant Design Vue3 Editable Table Value Does Not Change
body: <p>I have used the table component from the ant design, and right now I'm stuck on why this cannot work,</p>
  <p>The reference link is:
  <a href="https://2x.antdv.com/components/table-cn#components-table-demo-edit-cell" rel="nofollow noreferrer">https://2x.antdv.com/components/table-cn#components-table-demo-edit-cell</a></p>
  <p>Here's the source code from the ant design about editable table:</p>
  <pre><code>&lt;template&gt;
    &lt;a-table :columns=&quot;columns&quot; :data-source=&quot;dataSource&quot; bordered&gt;
      &lt;template v-for=&quot;col in ['name', 'age', 'address']&quot; #[col]=&quot;{ text, record }&quot; :key=&quot;col&quot;&gt;
        &lt;div&gt;
          &lt;a-input
            v-if=&quot;editableData[record.key]&quot;
            v-model:value=&quot;editableData[record.key][col]&quot;
            style=&quot;margin: -5px 0&quot;
          /&gt;
          &lt;template v-else&gt;
            {{ text }}
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/template&gt;
      &lt;template #operation=&quot;{ record }&quot;&gt;
        &lt;div class=&quot;editable-row-operations&quot;&gt;
          &lt;span v-if=&quot;editableData[record.key]&quot;&gt;
            &lt;a @click=&quot;save(record.key)&quot;&gt;Save&lt;/a&gt;
            &lt;a-popconfirm title=&quot;Sure to cancel?&quot; @confirm=&quot;cancel(record.key)&quot;&gt;
              &lt;a&gt;Cancel&lt;/a&gt;
            &lt;/a-popconfirm&gt;
          &lt;/span&gt;
          &lt;span v-else&gt;
            &lt;a @click=&quot;edit(record.key)&quot;&gt;Edit&lt;/a&gt;
          &lt;/span&gt;
        &lt;/div&gt;
      &lt;/template&gt;
    &lt;/a-table&gt;
  &lt;/template&gt;
  &lt;script lang=&quot;ts&quot;&gt;
  import { cloneDeep } from 'lodash-es';
  import { defineComponent, reactive, ref, UnwrapRef } from 'vue';
  
  const columns = [
    {
      title: 'name',
      dataIndex: 'name',
      width: '25%',
      slots: { customRender: 'name' },
    },
    {
      title: 'age',
      dataIndex: 'age',
      width: '15%',
      slots: { customRender: 'age' },
    },
    {
      title: 'address',
      dataIndex: 'address',
      width: '40%',
      slots: { customRender: 'address' },
    },
    {
      title: 'operation',
      dataIndex: 'operation',
      slots: { customRender: 'operation' },
    },
  ];
  interface DataItem {
    key: string;
    name: string;
    age: number;
    address: string;
  }
  const data: DataItem[] = [];
  for (let i = 0; i &lt; 100; i++) {
    data.push({
      key: i.toString(),
      name: `Edrward ${i}`,
      age: 32,
      address: `London Park no. ${i}`,
    });
  }
  export default defineComponent({
    setup() {
      const dataSource = ref(data);
      const editableData: UnwrapRef&lt;Record&lt;string, DataItem&gt;&gt; = reactive({});
  
      const edit = (key: string) =&gt; {
        editableData[key] = cloneDeep(dataSource.value.filter(item =&gt; key === item.key)[0]);
      };
      const save = (key: string) =&gt; {
        Object.assign(dataSource.value.filter(item =&gt; key === item.key)[0], editableData[key]);
        delete editableData[key];
      };
      const cancel = (key: string) =&gt; {
        delete editableData[key];
      };
      return {
        dataSource,
        columns,
        editingKey: '',
        editableData,
        edit,
        save,
        cancel,
      };
    },
  });
  &lt;/script&gt;
  &lt;style scoped&gt;
  .editable-row-operations a {
    margin-right: 8px;
  }
  &lt;/style&gt;
  </code></pre>
  <p>However, I have the functionality that my name will be a hyperlink, so I need to put the name column and its value outside the v-for. Here's what I got:</p>
  <pre><code>&lt;template&gt;
    &lt;a-table :columns=&quot;columns&quot; :data-source=&quot;dataSource&quot; bordered&gt;
      &lt;template v-for=&quot;col in ['age', 'address']&quot; #[col]=&quot;{ text, record }&quot; :key=&quot;col&quot;&gt;
        &lt;div&gt;
          &lt;a-input
            v-if=&quot;editableData[record.key]&quot;
            v-model:value=&quot;editableData[record.key][col]&quot;
            style=&quot;margin: -5px 0&quot;
          /&gt;
          &lt;template v-else&gt;
            {{ text }}
          &lt;/template&gt;
        &lt;/div&gt;
  
       &lt;template #name=&quot;{ text, record }&quot;&gt;
        &lt;div&gt;
          &lt;a-input v-if=&quot;editableData[record.key]&quot; v-model:value=&quot;editableData[record.key][record.name]&quot; style=&quot;margin:
  -5px 0&quot;&gt;&lt;/a-input&gt;
           &lt;router-link v-else=&quot;v-else&quot; to=&quot;/tables/123&quot;&gt;{{ text }}&lt;/router-link&gt;
        &lt;/div&gt;
      &lt;/template&gt;
  
      &lt;/template&gt;
      &lt;template #operation=&quot;{ record }&quot;&gt;
        &lt;div class=&quot;editable-row-operations&quot;&gt;
          &lt;span v-if=&quot;editableData[record.key]&quot;&gt;
            &lt;a @click=&quot;save(record.key)&quot;&gt;Save&lt;/a&gt;
            &lt;a-popconfirm title=&quot;Sure to cancel?&quot; @confirm=&quot;cancel(record.key)&quot;&gt;
              &lt;a&gt;Cancel&lt;/a&gt;
            &lt;/a-popconfirm&gt;
          &lt;/span&gt;
          &lt;span v-else&gt;
            &lt;a @click=&quot;edit(record.key)&quot;&gt;Edit&lt;/a&gt;
          &lt;/span&gt;
        &lt;/div&gt;
      &lt;/template&gt;
    &lt;/a-table&gt;
  &lt;/template&gt;
  &lt;script lang=&quot;ts&quot;&gt;
  import { cloneDeep } from 'lodash-es';
  import { defineComponent, reactive, ref, UnwrapRef } from 'vue';
  
  const columns = [
    {
      title: 'name',
      dataIndex: 'name',
      width: '25%',
      slots: { customRender: 'name' },
    },
    {
      title: 'age',
      dataIndex: 'age',
      width: '15%',
      slots: { customRender: 'age' },
    },
    {
      title: 'address',
      dataIndex: 'address',
      width: '40%',
      slots: { customRender: 'address' },
    },
    {
      title: 'operation',
      dataIndex: 'operation',
      slots: { customRender: 'operation' },
    },
  ];
  interface DataItem {
    key: string;
    name: string;
    age: number;
    address: string;
  }
  const data: DataItem[] = [];
  for (let i = 0; i &lt; 100; i++) {
    data.push({
      key: i.toString(),
      name: `Edrward ${i}`,
      age: 32,
      address: `London Park no. ${i}`,
    });
  }
  export default defineComponent({
    setup() {
      const dataSource = ref(data);
      const editableData: UnwrapRef&lt;Record&lt;string, DataItem&gt;&gt; = reactive({});
  
      const edit = (key: string) =&gt; {
        editableData[key] = cloneDeep(dataSource.value.filter(item =&gt; key === item.key)[0]);
      };
      const save = (key: string) =&gt; {
        Object.assign(dataSource.value.filter(item =&gt; key === item.key)[0], editableData[key]);
        delete editableData[key];
      };
      const cancel = (key: string) =&gt; {
        delete editableData[key];
      };
      return {
        dataSource,
        columns,
        editingKey: '',
        editableData,
        edit,
        save,
        cancel,
      };
    },
  });
  &lt;/script&gt;
  &lt;style scoped&gt;
  .editable-row-operations a {
    margin-right: 8px;
  }
  &lt;/style&gt;
  </code></pre>
  <p>However, when I changed my name through the editing mode, it seems that the name will not change based on the edited name. Is there anything I'm wrong? Any help will be greatly appreciated!</p>