Hello there community… I have a problem with a repeater. When the users clicks a button it goes to page that a repeater loads. The repeater gets filtered out by the button value but for the fist seconds it shows all the items… Then it gets filtered which is what i want… What can i do to prevent the database for showing all at the first seconds?
code i use on page one is
import wixLocation from ‘wix-location’ ;
import { session } from ‘wix-storage’ ;
export function dataset1_ready() {
makeRepeater();
}
export function makeRepeater() {
$w( “#repeater1” ).forEachItem(($item, itemData, index) => {
$item( "#Button1" ).onClick((event) => {
$w( "#TextBoxInput" ).value = itemData.title;
let value = $w( “#TextBoxInput” ).value;
session.setItem( “TextBoxInput” , value);
wixLocation.to( ‘/categories’ );
});
});
}
code i use on the page that gets loaded
import wixData from ‘wix-data’ ;
import { session } from ‘wix-storage’ ;
$w.onReady( function () {
var sameWord = session.getItem( “TextBoxInput” );
session.clear();
//w(“#SubInput”).value = sameWord;
let filter = wixData.filter();
$w( “#dataset1” ).setFilter(
filter.eq( “label” , sameWord)
);
})
Any help would be appreciated…!!!