Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roman01la/virtual.list
Virtual list component for Prum
https://github.com/roman01la/virtual.list
clojurescript prum rum virtual-list
Last synced: about 2 months ago
JSON representation
Virtual list component for Prum
- Host: GitHub
- URL: https://github.com/roman01la/virtual.list
- Owner: roman01la
- License: epl-1.0
- Created: 2017-10-08T20:01:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-09T08:38:38.000Z (about 7 years ago)
- Last Synced: 2024-06-24T22:12:42.832Z (7 months ago)
- Topics: clojurescript, prum, rum, virtual-list
- Language: Clojure
- Homepage: https://roman01la.github.io/virtual.list/
- Size: 46.9 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# virtual.list
_Virtual list component for [Prum](https://github.com/roman01la/prum)_
`[org.roman01la/virtual.list "0.1.2"]`
## Usage
See [live demo](https://roman01la.github.io/virtual.list/) & example source code
## API
```clojure
(virtual.list/v-list
{:rows-count 8
:max-rows-count 1000
:row-height 48
:render-row render-row
:overscan-count 4
:timeout 120})
```
- `:rows-count` — amount of visible rows to render, default is unspecified
- `:max-rows-count` — total amount of rows in a list, default is unspecified
- `:row-height` — height of a single wo in pixels, default is unspecified
- `:render-row` — a function returning a row component, accepts a map of `:idx` & `:scrolling?`, default is unspecified
- `:idx` — index of current row in `:max-rows-count`
- `:scrolling?` — whether list is being scrolled or not
- `:overscan-count` — number of rows to render ahead of scrolling direction, default is `0`
- `:timeout` — `scrolling?` timeout is milliseconds, default is `150`