I am trying to use collapsible text in repeaters. I managed to create them, However when one clicks on the more the extra text does not show. Any help please?
Hi, pierresciberras !!
Is the action set to “Expand” when clicked for the collapsible text?
Yes please. There are some fields which has more characters and till now I cannot manage to have it working
I personally think that having a large number of items displayed in the repeater and the expanded text being large could be causing some issues. How about temporarily reducing the number of items loaded in the repeater to one and checking if the “Read More” functionality works? And, please also try temporarily reducing the amount of text that expands at the same time for testing.
here iam initially assigning first 40 letters, once user click readmore button iam assigning full description to text field
$w(“#myRepeater”).onItemReady(($item, itemData, index) => {
$w(“#myRepeater”).forEachItem(($item, itemData, index) => {
//assigning first 40 letters to text element
$item(“#text”).text = itemData.description.substring(0, 40);
$item(‘#readmore’).onClick(()=>{
//assigning full description to text field
$item(“#text”).text = itemData.description;
//hide read more button
$item(‘#readmore’).hide();
})
});
});