Closed duyld2108 closed 3 weeks ago
I have a UTable with Pagination, everything is good. But I have a Custom Component to show and update row data info inside Table. Eg.
<UTable :columns=“columns” :row=“paginatedRows”> <template #actions-data=“{row}”> <CustomComponent :item-data=“row” /> </template> <UTable>
Firstly everything is okay, CustomComponent can receive correct prop from row data. But when page changed, item-data passed to CustomComponent didn’t update, It keeps row data from previous page.
How to resolve. Thank you.
Hey bro :) Try to get the CustomComponent a key attribute. Like:
<CustomComponent :item-data="row" :key="row.id" />
@noxsii thanks bro. Its work. I meet the basic mistake. LoL
Description
I have a UTable with Pagination, everything is good. But I have a Custom Component to show and update row data info inside Table. Eg.
Firstly everything is okay, CustomComponent can receive correct prop from row data. But when page changed, item-data passed to CustomComponent didn’t update, It keeps row data from previous page.
How to resolve. Thank you.