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
Hey, when using sst, the first page populates the data to the table correctly, but when I go to another page, after I replace the old data with the new data at the setTable method table tells me no records, while when I console.log the data is coming back correctly. What might be the issue?
I was having the same issue myself.
What you are trying to do is not possible... Well not without hacks.
The SSR with pages seems to be broken.
For exemple, if you go the 2nd pages, the vs-table expect data to be content page page 1 + content for page 2. The server side rendering does not work properly...
What you can do is to have an external vs-pagination and link it to your vs-table.
When a click is detected to the pagination, you can now do your request on your server, BUT the table MUST stay on page one.
Hey, when using sst, the first page populates the data to the table correctly, but when I go to another page, after I replace the old data with the new data at the setTable method table tells me no records, while when I console.log the data is coming back correctly. What might be the issue?
`<vs-table
:sst="true"
@search="handleSearch"
@change-page="handleChangePage"
@sort="handleSort"
v-model="selected"
pagination
max-items="3"
:total="table.totalElements"
search
:data="data">
`export default{
data:() => ({
selected:[],
data:[],
table: {
direction: 'DESC',
orderBy: 'id',
page: 0,
size: 3,
totalElements: 0,
},
headers:[
{
key: 'name',
label: 'tableName',
},
{
key: 'description',
label: 'tableDescription',
},
{
key: 'unitValue',
label:'tableUnitValue' ,
},
{
key: 'parentProduct',
label:'tableParentProduct' ,
},
{
key: 'productType',
label:'tableProductType' ,
},
{
key: 'category',
label: 'tableCategory'
},
{
key: 'dateCreated',
label: 'tableDateCreated'
}
]
}),
methods:{
handleChangePage (page) {
this.table.page = page - 1;
this.setTable();
},
setTable(){
}
}`
The text was updated successfully, but these errors were encountered: