Table keep reloading

Hello,
I’ve table connected to dataset(which is connected to Collection). Not every row of the table is visible, u’ve to scroll down, because there is about ~1k records.

The problem is that when I scroll down and click any row table start reloading and is getting back to the top.

About my code - I don’t have $w(“#table1”).onRowSelect( (event) => in it.

Hi there,

Could you please share your code with us?

Sure:

import wixData from 'wix-data';

$w.onReady(function () {
    $w("#table1").hide();
/*  $w("#table1").onRowSelect( (event) => {
        let rowData = event.rowData;
        let rowIndex = event.rowIndex;   
        let tableRows = $w("#table1").rows;
        var pn = tableRows[rowIndex]["oznaczenie"];
        var mah = tableRows[rowIndex]["pojemnosc"];
        var grub = tableRows[rowIndex]["grubosc"];
        var szer = tableRows[rowIndex]["szerokosc"];
        var wys = tableRows[rowIndex]["wysokosc"];
        console.log(pn);
        wixData.query("ListaAkyga2021")
            .eq("Part Number", "LP102050")
            .find()
            .then( (results) => {
                if(results.items.length > 0) {
                    let firstItem = results.items[0]; //see item belo
                    console.log(firstItem);
                } else {
 
                }
            } )
            .catch( (err) => {
                let errorMsg = err;
            } );
        });
        */
    $w("#button13").onClick( (event) => {
 var poj;
 var grubb;
 var szerr;
 var wyss;
 if ($w("#input1").value !== ""){
        poj = parseInt($w("#input1").value,10);
    }
 else{
        poj = 1;
    }
 if ($w("#input5").value !== ""){
        grubb = parseFloat($w("#input5").value);
    }
 else{
        grubb = 1000;
    }
 if ($w("#input3").value !== ""){
        szerr = parseFloat($w("#input3").value);
    }
 else{
        szerr = 1000;
    }
 if ($w("#input4").value !== ""){
        wyss = parseFloat($w("#input4").value);
    }
 else{
        wyss = 1000;
    }
    $w("#dataset1").setFilter(wixData.filter()
        .le("szerokosc",szerr) .le("wysokosc",wyss) .ge("pojemnosc",poj) .le("grubosc",grubb));     
    $w("#table1").show();
    });
});