You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the data prop of a <UTable> changes, the rows dont get properly unmounted
This results in components within a row to never have unMounted being called (only if the amount of rows is less for the ones that get removed)
Further this can result in a bugs and unexpected behavior because for components only the props change but the setup function is not called again
Reproduction
Consider the following simplified example. The badge never changes color. Also if one would use onMounted/onUnmounted within the badge component they would not get triggered when the data changes (only if the amount of rows change).
I think this was already the case within v2: There I have a table that contains <NuxtImg /> tags. When the data changes (e.g. by pagination) the new rows are displayed with the images of the old row until the new images are loaded. That is probably because the <NuxtImg /> components dont get removed and replaced by all new ones.
Let me know if I should create a reproduction repo
The text was updated successfully, but these errors were encountered:
Version
v3 latest commit
Description
I noticed the following behavior:
<UTable>
changes, the rows dont get properly unmountedunMounted
being called (only if the amount of rows is less for the ones that get removed)Reproduction
Consider the following simplified example. The badge never changes color. Also if one would use
onMounted
/onUnmounted
within the badge component they would not get triggered when the data changes (only if the amount of rows change).my-badge.vue
my-table.vue
Additional context
I think this was already the case within v2: There I have a table that contains
<NuxtImg />
tags. When the data changes (e.g. by pagination) the new rows are displayed with the images of the old row until the new images are loaded. That is probably because the<NuxtImg />
components dont get removed and replaced by all new ones.Let me know if I should create a reproduction repo
The text was updated successfully, but these errors were encountered: