ForgeComponents
en

Components

j-ChunkyScroll

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • can handle thousands items/elements

Configuration:

  • rowheight {Number} Important, a row height (default: 30 with auto obtaining of size)
  • parent {String} optional, a container with fixed height, can be window. Default value: parent element.
  • margin {Number} optional, a top/bottom margin together (default: 0)
  • scrolltop {Boolean} scrolls to top automatically if the path is changed (default: false)
  • marginxs {Number} optional, a top/bottom margin together for xs screen width
  • marginsm optional, a top/bottom margin together for sm screen width
  • marginmd optional, a top/bottom margin together for md screen width
  • marginlg optional, a top/bottom margin together for lg screen width

Use it with <ui-component name="chunkyscroll">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<div class="m">Awesome! Awesome! Awesome! Here you can scroll <b>30000 records</b> without laggy scrolling:</div>
<div style="width:500px;height:300px;border:1px solid #E0E0E0">
	<ui-component name="chunkyscroll" path="items">
		<script type="text/html">
			<div style="height:30px;border-top:1px solid #E0E0E0">{{ index }}</div>
		</script>
	</ui-component>
</div>
<br />
<div>Free and open-soruce alternative to <a href="https://github.com/NeXTs/Clusterize.js/" target="_blank">Clusterize.js</a></div>

<script>
	var items = [];
	for (var i = 0; i < 30000; i++)
		items.push({ index: i + 1 });
</script>