Hallo everybody,
i am new here, because i have a big problem with a Wix-Code which i can not solve by myself.
What i want to do?
I have a REPEATER on my website which ist connected to a dataset. The dataset ist connected to a database. The repeater shows only 3-items, because it would slow down very fast, if i would use a page with 5 or more showed items in the repeater.
So my idea is to enlarge the repeater by pressing a button. If the button is pressed the repeater has then to load 3-more items and show 6-items at all for example. And when someone clicks on the button one more time, the repeater has to show then 9-items at all.
What i know?
I know that there is an option to manage it manualy by using the options by a button and connect it to a dataset with the “load more” function…
What is the Result?
By doing how it is shown at the picture, it does exactly what i want to do by code.
The repeater shows more items/content after the button [Load more] was clicked.
Instead of just 3-items, the repeaters shows after clicking on the button 6-items.
My Problem!
And this is exactly what i want to do/generate by a code (WixCode).
I tried alredy all that kind of code in different versions, but without success! :-((((((((
export function button1_click(event) {
$w(‘#dataset1’).setPageSize(10),
$w(‘#dataset1’).refresh(),
$w(‘#dataset1’).loadMore(),
$w(‘#dataset1’).loadPage()
$w(‘#dataset1’).show()
}
Also played with repeater-options like …
export function button12_click(event) {$w(‘#repeater1’).expand()}
export function button13_click(event) {$w(‘#repeater1’).collapse()}
… and other, but could not find the solution like it is shown at the picture.
Who can help me and show me the right code for my problem???
Thank you very much for your taken time ( and sorry for my bad english ).