How can use repeater view more button?

I follow this Article link step by step many time still now work.
Do you have experience use view more button? this is big issue for me

I get error

Can you please share a link to your site and specify the name of the page?

Roi thank you for information I really appreciate

Here is link
same repeater in page 1 and page 2
Page 2 without page code
Page 1 with page code below

let fullText; // variable to hold the full text
let shortText; // variable to hold the short version of the text
$w.onReady( function () {
$w(“#dataset1”).onReady( function () {
// how many characters to include in the shortened version
const shortTextLength = 40;
// set the fullText variable to be the text from the collection
fullText = $w(‘#dataset1’).getCurrentItem().html;
// if no text to display, collapse the text element and the button
if (!fullText) {
} else {
// if the text has fewer or the same number of characters as shortTextLength characters, display it as is and collapse the “Show More” button
if (fullText.length <= shortTextLength) {
$w(‘#text27’).text = fullText;
} else {
// create the shortened version of the text and display it in the text element
shortText = fullText.substr(0, shortTextLength) + “…”;
$w(‘#text27’).text = shortText;
//TODO: write your page related code here…

export function button3_click(event, $w) {
if ($w(“#text27”).text === shortText) {
// if currently displaying short text, display the full text
$w(“#text27”).text = fullText;
$w(“#button3”).label = “Show less”;
} else {
// if currently displaying full text, display the short text
$w(“#text27”).text = shortText;
$w(“#button3”).label = “Show more”;
//Add your code for this event here:

Notice: Repeater title and picture not setup link to Dataset




Before I take a look at your code I can already tell you,
using DataBinding (connecting to dataset) and manipulating the same component by code - Won’t work.
Using the two methods results in a collision that often ends with a broken data.
In order for your code to work you’ll need to populate your repeater using code instead of connecting it to the Dataset.


HI Doron Thank you very much for your information I try fix this issue by myself but I don’t know how populate my repeater using code instead of connecting it the Dataset.