8000 fix(Table): revert #2600 to fix excessive column data slot re-renders by coreyshuman Β· Pull Request #3375 Β· nuxt/ui Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(Table): revert #2600 to fix excessive column data slot re-renders #3375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/runtime/components/data/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@

<slot
v-else
:key="retriggerSlot"
:name="`${column.key}-data`"
:column="column"
:row="row"
Expand Down Expand Up @@ -132,7 +131,7 @@
</template>

<script lang="ts">
import { computed, defineComponent, ref, toRaw, toRef, watch } from 'vue'
import { computed, defineComponent, toRaw, toRef } from 'vue'
import type { PropType, AriaAttributes } from 'vue'
import { upperFirst } from 'scule'
import { defu } from 'defu'
Expand Down Expand Up @@ -307,8 +306,6 @@ export default defineComponent({
})
})

const retriggerSlot = ref(null)

const savedSort = { column: sort.value.column, direction: null }

const rows = computed(() => {
Expand Down Expand Up @@ -483,12 +480,6 @@ export default defineComponent({
return undefined
}

watch(rows, () => {
retriggerSlot.value = new Date()
}, {
deep: true
})

return {
// eslint-disable-next-line vue/no-dupe-keys
ui,
Expand All @@ -515,8 +506,7 @@ export default defineComponent({
getRowData,
toggleOpened,
getAriaSort,
isExpanded,
retriggerSlot
isExpanded
}
}
})
Expand Down
0