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

react-virtualized

Package Overview
Dependencies
Maintainers
1
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtualized - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

6

CHANGELOG.md
Changelog
------------
#### 4.2.0
Replaced `React.cloneElement` with wrapper element in order to:
* Better support for pure function components; (they were not compatible with inline style positioning).
* Relax the requirement of `rowRenderer` having to specify a `key`.
* Support `React.PropTypes.node` children (including plain strings, numbers, etc.) instead of just elements.
#### 4.1.0

@@ -5,0 +11,0 @@ Added `-webkit-overflow-scrolling: touch` for smoother inertial scrolling on mobile devices.

2

docs/VirtualScroll.md

@@ -14,3 +14,3 @@ VirtualScroll

| rowHeight | Number or Function | ✓ | Either a fixed row height (number) or a function that returns the height of a row given its index: `(index: number): number` |
| rowRenderer | Function | ✓ | Responsbile for rendering a row given an index. Rendered rows must have a unique `key` attribute. |
| rowRenderer | Function | ✓ | Responsbile for rendering a row given an index. Signature should look like `(index: number): React.PropTypes.node` |
| rowsCount | Number | ✓ | Number of rows in list. |

@@ -17,0 +17,0 @@ | scrollToIndex | Number | | Row index to ensure visible (by forcefully scrolling if necessary) |

@@ -6,3 +6,3 @@ {

"user": "bvaughn",
"version": "4.1.0",
"version": "4.2.0",
"scripts": {

@@ -9,0 +9,0 @@ "build": "npm run build:css && npm run build:dist && npm run build:demo",

@@ -58,7 +58,3 @@ <img src="https://cloud.githubusercontent.com/assets/29597/11737732/0ca1e55e-9f91-11e5-97f3-098f2f8ed866.png" alt="React virtualized" data-canonical-src="https://cloud.githubusercontent.com/assets/29597/11737732/0ca1e55e-9f91-11e5-97f3-098f2f8ed866.png" width="330" height="100" />

rowRenderer={
index => (
<div key={index}>
{list[index]}
</div>
)
index => list[index] // Could also be a DOM element
}

@@ -134,7 +130,3 @@ />,

rowRenderer={
index => (
<div key={index}>
{list[index]}
</div>
)
index => list[index] // Could also be a DOM element
}

@@ -183,7 +175,3 @@ />

rowRenderer={
index => (
<div key={index}>
{list[index]}
</div>
)
index => list[index] // Could also be a DOM element
}

@@ -190,0 +178,0 @@ />

@@ -150,8 +150,5 @@ /**

const { list } = this.props
const { useDynamicRowHeight, virtualScrollRowHeight } = this.state
const { useDynamicRowHeight } = this.state
const datum = list.get(index)
const height = useDynamicRowHeight
? datum.size
: virtualScrollRowHeight

@@ -173,5 +170,4 @@ let additionalContent

<div
key={index}
className={styles.row}
style={{ height }}
style={{ height: '100%' }}
>

@@ -178,0 +174,0 @@ <div

@@ -250,7 +250,6 @@ /** @flow */

let child = rowRenderer(i)
child = React.cloneElement(
child,
{
style: {
...child.props.style,
child = (
<div
key={i}
style={{
position: 'absolute',

@@ -260,4 +259,6 @@ top: datum.offset,

height: this._getRowHeight(i)
}
}
}}
>
{child}
</div>
)

@@ -264,0 +265,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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