react-infinite-grid-scroller
Advanced tools
Comparing version 2.2.1 to 2.2.2
{ | ||
"name": "react-infinite-grid-scroller", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "infinite vertical or horizontal scroll using css grid layout", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# react-infinite-grid-scroller (RIGS) | ||
Heavy-duty vertical or horizontal infinite scroller | ||
[![npm](https://img.shields.io/badge/npm-2.2.0-brightgreen)](https://www.npmjs.com/package/react-infinite-grid-scroller) [![licence](https://img.shields.io/badge/licence-MIT-green)](LICENSE.md) | ||
[![npm](https://img.shields.io/badge/npm-2.2.2-brightgreen)](https://www.npmjs.com/package/react-infinite-grid-scroller) [![licence](https://img.shields.io/badge/licence-MIT-green)](LICENSE.md) | ||
@@ -98,3 +98,3 @@ # Key Features | ||
|gap:integer \| integer[]| number of pixels between cells|there is no gap at start or end of rows or columns; default = 0; accepts an array of integers as well as a standalone integer. Values match standard CSS order. Standalone integer = gap (in pixels) for both of column-gap (horizontal) and row-gap (vertical). 1-item array, same as integer. 2-item array = [col-gap, row-gap]| | ||
|getItemPack(index:integer, itemID:integer, context:object): object |host-provided function. `index` signifies position in list; session `itemID` (integer) is for tracking and matching. `context` provides an `accept` property when dnd is installed. Arguments provided by system|required. Must return a simple object with three properties: `component` - a React component or promise of a component (`React.isValidElement`), `dndOptions` (if dnd is enabled; see Drag and Drop section), and `profile`- a simple host-defined object which gets returned to the host for identification in various contexts| | ||
|getItemPack(index:integer, itemID:integer, context:object): object |host-provided function. `index` signifies position in list; session `itemID` (integer) is for tracking and matching. `context` provides an `accept` property when dnd is installed. Arguments provided by system|required. Must return a simple object with three properties: `component` - a React component or promise of a component (`React.isValidElement`), `dndOptions` (if dnd is enabled; see Drag and Drop section), and `profile`- a simple host-defined object with reference data about the item, which gets returned to the host for identification in various contexts| | ||
|[_**LIST CONFIGURATION**_]| | ||
@@ -116,2 +116,3 @@ |startingListRange:[lowindex, highindex] \| []|two part array , or empty array []|lowindex must be <= highindex; both can be positive or negative integers. [] (empty array) creates an empty virtual list. Can be modified at runtime. | | ||
|usePlaceholder:boolean| default = true|allows suppression of use of default or custom placeholder. Placeholders show messages to the user while user components are fetched, and report errors| | ||
|profile:object|a simple object provided by host containing scroller reference data|the scroller `profile` object is returned to the host by RIGS for reference through `getDropEffect`, the `scrollerProfile` property of the `getItemPack` `context` argument, the `scrollerProfile` property of the `dragDropTransferCallback` `context` argument, and in the `scrollerContext` object. See below.| | ||
|staticComponent:React.FC|an arbitrary react component inserted as a layer. Ignored unless the `layout` property is set to 'static'|This allows the root of the Scroller tree to have an arbitrary layout. Specifically the inserted component allows for more than one top-level scroller, with drag and drop between them. If the `layout` 'static' option is set all other properties (except `dndOptions`) are ignored| | ||
@@ -222,3 +223,3 @@ |[_**OBJECT PROPERTIES**_]| | ||
|[_**TRACK INDEXES**_]| | ||
|dragDropTransferCallback(fromScrollerID:number, fromIndex:number, toScrollerID:number, toIndex:number, content:object)|contextType:'dragDropTransfer', scrollerID, item |item contains item source data: dndOptions (type, dragText), dropEffect, index, itemID, profile, scrollerID| | ||
|dragDropTransferCallback(fromScrollerID:number, fromIndex:number, toScrollerID:number, toIndex:number, content:object)|contextType:'dragDropTransfer', scrollerID, scrollerProfile, item |item contains item source data: dndOptions (type, dragText), dropEffect, index, itemID, profile, scrollerID| | ||
|referenceIndexCallback(index: integer, context:object)|contextType: 'referenceIndex', action, cradleState, scrollerID|`action` can be 'setCradleContent' or 'updateCradleContent'. `cradleState` is the state change that triggered the action. Keeps the host up to date on the index number adjacent to the `Cradle` axis| | ||
@@ -225,0 +226,0 @@ |repositioningIndexCallback(index: integer, context:object)|contextType: 'repositioningIndex', scrollerID|the current index during repositioning. Useful for feedback to user when host sets `useScrollTracker` property to false| |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
735656
9963
720