# j-ChunkyScroll

> j-ChunkyScroll: can handle thousands items/elements

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: d89e270677139f7f35649bbc70fdcf15d30f942d67b7195f18d555c1310e37e1
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- 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.

```html 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>
```
