
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
vue-collection-cluster
Advanced tools
A vue component for displaying large data sets easily with great performance.
A vue component for displaying large data sets easily with great performance.
npm install --save vue-collection-cluster
<template>
<collection-cluster
v-bind="collection"
:items="items"
></collection-cluster>
</template>
import CollectionCluster from 'vue-collection-cluster';
export {
components: {CollectionCluster},
data() {
return {
collection: {
},
items: [{
type: 'header',
title: 'List',
}, {
type: 'letter',
value: 'A',
}]
}
}
}
Each item in the list must have type, by the type a correct slot is rendered for item.
<collection-cluster :items="items">
<div slot="header"
slot-scope="{ cell, item }"
:key="cell.index"
class="item"
>
{{ item.title }}
</div>
<div slot="letter"
slot-scope="{ cell, item }"
:key="cell.index"
class="item"
>
{{ item.value }}
</div>
</collection-cluster>
Each slot must have size set in the css, which must be equal to size set in itemHeight
option.
Each item in the list must have property (heightField
) with the exact height of the slot for that item.
Size of slot is automaticaly calculated when rendered and set to heightField
property of the item.
For dynamic/automatic types, the itemHeight
option is used as estimate. It's strongly recommended to use it.
Type: Array
, Required
List of items to display.
Type: Number
, Default: 1
Number of columns per row.
Type: Number
, Default: 100
Height of the row.
Type: String
, Default: type
Item property's name for type.
Type: String
, Default: height
Item property's name for height.
Type: String
, Default: static
, Options: static
, dynamic
, automatic
Type: Object
, Default: {top: 0, bottom: 0}
Inset from top and bottom of the list.
Type: Number
, Default: 0
Renders space at the end of the list of size height
* scrollPastEnd
.
0.5
= 50% of height
Type: Number
, Default: 200
Pixels to pre-render around visible area.
Type: Number
, Default: 50
Threshold for scrollToTop
& scrollToBottom
events.
Type: Boolean
, Default: true
Sets whether the list should auto resize and render items when window resizes.
Emitted when visible/rendered cells change. There is one argument with list of cells.
FAQs
A vue component for displaying large data sets easily with great performance.
The npm package vue-collection-cluster receives a total of 32 weekly downloads. As such, vue-collection-cluster popularity was classified as not popular.
We found that vue-collection-cluster demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.