Close this search box.
Logo der Arineo GmbH
16. March 2022
0 Minute
Zwei Personen vor einem Laptop.

PowerSnippets – Hide Controls

Decluttering the DOM tree when using large tables.

So the inevitable has happened. A customer or colleague has built a gallery to use as a table showing loads of columns and extending over the canvas’ border. Your app performance is degrading and due to that, sidescrolling becomes more of a drag than a pleasat experience.

Simply modify the visbility value of the controls in the following manner:

๐™ธ๐š([๐™ฒ๐š˜๐š—๐š๐š›๐š˜๐š•].๐š‡ + [๐™ฒ๐š˜๐š—๐š๐š›๐š˜๐š•].๐š†๐š’๐š๐š๐š‘ >= ๐Ÿถ && [๐™ฒ๐š˜๐š—๐š๐š›๐š˜๐š•].๐š‡ <= ๐Ÿท๐Ÿน๐Ÿผ๐Ÿถ;๐š๐š›๐šž๐šŽ;๐š๐šŠ๐š•๐šœ๐šŽ)โ€‹

This ensures that the control is hidden when not within the boundaries of the canvas. It is also really helpful when designing large tables within galleries.

That’s all folks.