Flex Repeater set some rows' 'display' to false?

8.1.0

Is it possible to hide (e.g. set flex position.display to false) rows in a flex repeater? So that they are removed from the DOM and hence the other rows are pushed up to fill the gaps?

Context:
The Alarm Status Table component is broken and kills server CPU performance in v8.1.0, and v8.1.3 performance is broken in general (Performance drastically degrade from 8.1.1 to 8.1.2/3 in the desinger view - #5 by Carl.Gould):confused: so in the meantime I want to use a flex repeater to show alarms, but only those that are currently active, and preferably I just want to have all of the instances defined, but hide them on condition

Edit:
It looks like I can kind of use the height of the Flex template View for this… It’s a bit dodgy though. Set View height to 0 when the alarm is off and set the flex repeater to use the default height of the View. When the alarm changes though, the repeater has an aneurysm. Turning useDefaultViewHeight off and on gets it back :confused:

Hi @nminchin,

Have you tried setting instanceStyle.display = "none" for one of the view instances? Note, this won’t remove the element from the DOM, but the element will be removed from document layout/flow.

Thanks,
Alen

3 Likes