11-27-2019 14:42
11-27-2019 14:42
is it possible to remove items from the cycleview component using javascript ?
12-01-2019 10:47
12-01-2019 10:47
to add to this ive tried using css and js code to hide one of the items and also tried ot remove it.
ive tried to remove the use tag and the image and text inside but they are not there to remove.
08-08-2020 12:56 - edited 08-08-2020 12:59
08-08-2020 12:56 - edited 08-08-2020 12:59
Hi sleedoh,
I don't know about completely removing them if that's what you're after, but you can certainly hide them. In your index.gui, make sure you give the individual items you're cycling through their own names. E.g.
<use href="#cycleview-item" id="activeSection">
<text id="randomText">Hello</text>
</use>
Then in your app code, get a handle to that specific cycleview item:
let activeSection = document.getElementById("activeSection");
Once you have the handle you can show and hide that item using display="none" and display="inline":
// To hide the element:
activeSection.style.display = "none";
// To show it:
activeSection.style.display = "inline";
Cheers,
Paul.
08-25-2020 11:26
08-25-2020 11:26
I have a similar issue. I thought I could use the style.display tag and set it to none, but as I cycle through the elements, the cycleview glitches as it comes to the element that was removed.
08-25-2020 11:42
08-25-2020 11:42
Do you want to remove it so users don't see it, or allow them to select which items to cycle on screen?
09-07-2020 12:43
09-07-2020 12:43
Would be useful to remove it so it doesn't get cycled through. If we just hide it then it will be cycled as an emtpy view.
My use case is for the stats cycle items in the sdk moment sample project i want to remove the elevation for versa lite only.
09-09-2020 06:47
09-09-2020 06:47
I wasn't able to make this work either. My suggestion would be to either implement your own, or have 2 cycle views, and just hide/show the entire thing. I have an internal ticket for this issue.