Skip to content

UTable data updated but UI will not update #3597

@kingsley8524267

Description

@kingsley8524267

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0

Reproduction

<script setup lang="ts">
const data = ref([
  {
    id: '0',
  },
])

const add = () => {
  data.value.push({
    id: `${data.value.length}`,
  })
  console.log(data.value)
}

</script>

<template>
  <div>
    <UTable :data="data" class="flex-1"/>
    <UButton
        @click="add">Add
    </UButton>
  </div>
</template>

Description

After click the "add" button, it will push a new data into dataRef, but the Table will not rendering new data

Image

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions