Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-window

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-window - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3

72

dist/index.cjs.js

@@ -153,19 +153,25 @@ 'use strict';

function createGridComponent(_ref) {
var defaultItemKey = function defaultItemKey(_ref) {
var columnIndex = _ref.columnIndex,
rowIndex = _ref.rowIndex;
return rowIndex + ':' + columnIndex;
};
function createGridComponent(_ref2) {
var _class, _temp;
var getColumnOffset = _ref.getColumnOffset,
getColumnStartIndexForOffset = _ref.getColumnStartIndexForOffset,
getColumnStopIndexForStartIndex = _ref.getColumnStopIndexForStartIndex,
getColumnWidth = _ref.getColumnWidth,
getEstimatedTotalHeight = _ref.getEstimatedTotalHeight,
getEstimatedTotalWidth = _ref.getEstimatedTotalWidth,
getOffsetForColumnAndAlignment = _ref.getOffsetForColumnAndAlignment,
getOffsetForRowAndAlignment = _ref.getOffsetForRowAndAlignment,
getRowHeight = _ref.getRowHeight,
getRowOffset = _ref.getRowOffset,
getRowStartIndexForOffset = _ref.getRowStartIndexForOffset,
getRowStopIndexForStartIndex = _ref.getRowStopIndexForStartIndex,
initInstanceProps = _ref.initInstanceProps,
validateProps = _ref.validateProps;
var getColumnOffset = _ref2.getColumnOffset,
getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,
getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,
getColumnWidth = _ref2.getColumnWidth,
getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,
getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,
getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,
getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,
getRowHeight = _ref2.getRowHeight,
getRowOffset = _ref2.getRowOffset,
getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,
getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,
initInstanceProps = _ref2.initInstanceProps,
validateProps = _ref2.validateProps;

@@ -291,5 +297,5 @@ return _temp = _class = function (_PureComponent) {

key: 'scrollTo',
value: function scrollTo(_ref2) {
var scrollLeft = _ref2.scrollLeft,
scrollTop = _ref2.scrollTop;
value: function scrollTo(_ref3) {
var scrollLeft = _ref3.scrollLeft,
scrollTop = _ref3.scrollTop;

@@ -308,7 +314,7 @@ this.setState(function (prevState) {

key: 'scrollToItem',
value: function scrollToItem(_ref3) {
var _ref3$align = _ref3.align,
align = _ref3$align === undefined ? 'auto' : _ref3$align,
columnIndex = _ref3.columnIndex,
rowIndex = _ref3.rowIndex;
value: function scrollToItem(_ref4) {
var _ref4$align = _ref4.align,
align = _ref4$align === undefined ? 'auto' : _ref4$align,
columnIndex = _ref4.columnIndex,
rowIndex = _ref4.rowIndex;
var _state = this.state,

@@ -370,2 +376,4 @@ scrollLeft = _state.scrollLeft,

height = _props2.height,
_props2$itemKey = _props2.itemKey,
itemKey = _props2$itemKey === undefined ? defaultItemKey : _props2$itemKey,
rowCount = _props2.rowCount,

@@ -394,3 +402,3 @@ style = _props2.style,

isScrolling: useIsScrolling ? isScrolling : undefined,
key: _rowIndex + ':' + _columnIndex,
key: itemKey({ columnIndex: _columnIndex, rowIndex: _rowIndex }),
rowIndex: _rowIndex,

@@ -541,6 +549,6 @@ style: this._getItemStyle(_rowIndex, _columnIndex)

var validateSharedProps = function validateSharedProps(_ref4) {
var children = _ref4.children,
height = _ref4.height,
width = _ref4.width;
var validateSharedProps = function validateSharedProps(_ref5) {
var children = _ref5.children,
height = _ref5.height,
width = _ref5.width;

@@ -869,2 +877,6 @@ if (process.env.NODE_ENV !== 'production') {

var defaultItemKey$1 = function defaultItemKey(index) {
return index;
};
function createListComponent(_ref) {

@@ -1059,2 +1071,4 @@ var _class, _temp2;

itemCount = _props2.itemCount,
_props2$itemKey = _props2.itemKey,
itemKey = _props2$itemKey === undefined ? defaultItemKey$1 : _props2$itemKey,
style = _props2.style,

@@ -1077,3 +1091,3 @@ useIsScrolling = _props2.useIsScrolling,

items.push(React.createElement(children, {
key: _index,
key: itemKey(_index),
index: _index,

@@ -1080,0 +1094,0 @@ isScrolling: useIsScrolling ? isScrolling : undefined,

@@ -146,19 +146,25 @@ import React, { createElement, PureComponent } from 'react';

function createGridComponent(_ref) {
var defaultItemKey = function defaultItemKey(_ref) {
var columnIndex = _ref.columnIndex,
rowIndex = _ref.rowIndex;
return rowIndex + ':' + columnIndex;
};
function createGridComponent(_ref2) {
var _class, _temp;
var getColumnOffset = _ref.getColumnOffset,
getColumnStartIndexForOffset = _ref.getColumnStartIndexForOffset,
getColumnStopIndexForStartIndex = _ref.getColumnStopIndexForStartIndex,
getColumnWidth = _ref.getColumnWidth,
getEstimatedTotalHeight = _ref.getEstimatedTotalHeight,
getEstimatedTotalWidth = _ref.getEstimatedTotalWidth,
getOffsetForColumnAndAlignment = _ref.getOffsetForColumnAndAlignment,
getOffsetForRowAndAlignment = _ref.getOffsetForRowAndAlignment,
getRowHeight = _ref.getRowHeight,
getRowOffset = _ref.getRowOffset,
getRowStartIndexForOffset = _ref.getRowStartIndexForOffset,
getRowStopIndexForStartIndex = _ref.getRowStopIndexForStartIndex,
initInstanceProps = _ref.initInstanceProps,
validateProps = _ref.validateProps;
var getColumnOffset = _ref2.getColumnOffset,
getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,
getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,
getColumnWidth = _ref2.getColumnWidth,
getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,
getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,
getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,
getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,
getRowHeight = _ref2.getRowHeight,
getRowOffset = _ref2.getRowOffset,
getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,
getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,
initInstanceProps = _ref2.initInstanceProps,
validateProps = _ref2.validateProps;

@@ -284,5 +290,5 @@ return _temp = _class = function (_PureComponent) {

key: 'scrollTo',
value: function scrollTo(_ref2) {
var scrollLeft = _ref2.scrollLeft,
scrollTop = _ref2.scrollTop;
value: function scrollTo(_ref3) {
var scrollLeft = _ref3.scrollLeft,
scrollTop = _ref3.scrollTop;

@@ -301,7 +307,7 @@ this.setState(function (prevState) {

key: 'scrollToItem',
value: function scrollToItem(_ref3) {
var _ref3$align = _ref3.align,
align = _ref3$align === undefined ? 'auto' : _ref3$align,
columnIndex = _ref3.columnIndex,
rowIndex = _ref3.rowIndex;
value: function scrollToItem(_ref4) {
var _ref4$align = _ref4.align,
align = _ref4$align === undefined ? 'auto' : _ref4$align,
columnIndex = _ref4.columnIndex,
rowIndex = _ref4.rowIndex;
var _state = this.state,

@@ -363,2 +369,4 @@ scrollLeft = _state.scrollLeft,

height = _props2.height,
_props2$itemKey = _props2.itemKey,
itemKey = _props2$itemKey === undefined ? defaultItemKey : _props2$itemKey,
rowCount = _props2.rowCount,

@@ -387,3 +395,3 @@ style = _props2.style,

isScrolling: useIsScrolling ? isScrolling : undefined,
key: _rowIndex + ':' + _columnIndex,
key: itemKey({ columnIndex: _columnIndex, rowIndex: _rowIndex }),
rowIndex: _rowIndex,

@@ -534,6 +542,6 @@ style: this._getItemStyle(_rowIndex, _columnIndex)

var validateSharedProps = function validateSharedProps(_ref4) {
var children = _ref4.children,
height = _ref4.height,
width = _ref4.width;
var validateSharedProps = function validateSharedProps(_ref5) {
var children = _ref5.children,
height = _ref5.height,
width = _ref5.width;

@@ -862,2 +870,6 @@ if (process.env.NODE_ENV !== 'production') {

var defaultItemKey$1 = function defaultItemKey(index) {
return index;
};
function createListComponent(_ref) {

@@ -1052,2 +1064,4 @@ var _class, _temp2;

itemCount = _props2.itemCount,
_props2$itemKey = _props2.itemKey,
itemKey = _props2$itemKey === undefined ? defaultItemKey$1 : _props2$itemKey,
style = _props2.style,

@@ -1070,3 +1084,3 @@ useIsScrolling = _props2.useIsScrolling,

items.push(createElement(children, {
key: _index,
key: itemKey(_index),
index: _index,

@@ -1073,0 +1087,0 @@ isScrolling: useIsScrolling ? isScrolling : undefined,

{
"name": "react-window",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"description":

@@ -5,0 +5,0 @@ "React components for efficiently rendering large, scrollable lists and tabular data",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc