RESOLVED - Pagination Table Bug?

Hello,
I came across this problem of recognizing the selected row of a table if you are not on the first page of the table pagination.

This is the code I use to select the rows, while the table is connected to the database and the pagination is set in the properties of the table under the heading layout.

$w.onReady(function () {
 $w("#TabEventi").onRowSelect( (event) => {
 let rowData = event.rowData;    // {"fName": "John", "lName": "Doe"}
 let rowIndex = event.rowIndex;  // 2
 console.log("rowIndex TAbella   ----  " + rowIndex);
} );

$w("#dataset1").onReady( () => {
        $w("#dataset1").onCurrentIndexChanged( (index) => {
                DatiTabella();       
        });
    });
});

I write the results I get below

If they are on the first page of the table pagination everything works correctly, the rows that are selected have the correct index and also the database data correspond to the selected row

If I move to the second page of the table pagination, and select the first line, everything works correctly

The problem occurs if you select the other rows in the table, these refer me as I was still on the first page of table pagination

Has anyone ever had this problem?

Can you help me

Thank you so much for any help !!!

1 Like

Hi @reddany …
Yes this bug is present in table since wix table since 1 year… I will recommend you to use the new pagination bar instead of default table pagination bar… It needs some code but it works really good with table…

Here is the link to another issues with wix tables if you are interested…

Hi Nithin,
Thank you for your answer, I tried to circumvent the solution in every way, knowing that it does not exist comforts me.

I wanted to tell you what you mean by the new pagination bar, where I find it as you use it, you are guides, you can help me.

Thank you

You can find it in Add\User Input \ Pagination Bar…

BTW as I said…u need to write some code to make it work with the table…

Thank you,
I wanted to ask you two other things, is there any example or tutorial to see?
Is it possible to report or vote for this modification of this bug?

Thank you

I am sure there will be some examples in this forum… haha…it’s complicated…(please see who is the author of the post I shared)