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.0.1 to 4.0.2

3

CHANGELOG.md
Changelog
------------
#### 4.0.2
Additional `columnData` parameter passed to `onHeaderClick` callback.
#### 4.0.1

@@ -5,0 +8,0 @@ Removed an unused dependency on 'inline-style-prefixer' from the `package.json`.

2

docs/FlexTable.md

@@ -18,3 +18,3 @@ FlexTable

| noRowsRenderer | | Function | Callback used to render placeholder content when :rowsCount is 0 |
| onHeaderClick | | Function | Callback invoked when a user clicks on a table header. `(dataKey: string): void` |
| onHeaderClick | | Function | Callback invoked when a user clicks on a table header. `(dataKey: string, columnData: any): void` |
| onRowClick | | Function | Callback invoked when a user clicks on a table row. `(rowIndex: number): void` |

@@ -21,0 +21,0 @@ | onRowsRendered | | Function | Callback invoked with information about the slice of rows that were just rendered: `({ startIndex, stopIndex }): void` |

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

"user": "bvaughn",
"version": "4.0.1",
"version": "4.0.2",
"scripts": {

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

@@ -217,3 +217,3 @@ /** @flow */

const { headerClassName, onHeaderClick, sort, sortBy, sortDirection } = this.props
const { dataKey, disableSort, label } = column.props
const { dataKey, disableSort, label, columnData } = column.props
const showSortIndicator = sortBy === dataKey

@@ -241,3 +241,3 @@ const sortEnabled = !disableSort && sort

sortEnabled && sort(dataKey, newSortDirection)
onHeaderClick(dataKey)
onHeaderClick(dataKey, columnData)
}

@@ -244,0 +244,0 @@

@@ -85,2 +85,3 @@ import React from 'react'

dataKey='name'
columnData={ {data: 123} }
width={50}

@@ -336,3 +337,3 @@ cellRenderer={cellRenderer}

disableSort: true,
onHeaderClick: (dataKey) => onHeaderClickCalls.push({dataKey})
onHeaderClick: (dataKey, columnData) => onHeaderClickCalls.push({dataKey, columnData})
})

@@ -345,2 +346,3 @@ const tableDOMNode = findDOMNode(table)

expect(onHeaderClickCalls[0].dataKey).toEqual('name')
expect(onHeaderClickCalls[0].columnData.data).toEqual(123)
})

@@ -352,3 +354,3 @@

disableSort: false,
onHeaderClick: (dataKey) => onHeaderClickCalls.push({dataKey})
onHeaderClick: (dataKey, columnData) => onHeaderClickCalls.push({dataKey, columnData})
})

@@ -361,2 +363,3 @@ const tableDOMNode = findDOMNode(table)

expect(onHeaderClickCalls[0].dataKey).toEqual('name')
expect(onHeaderClickCalls[0].columnData.data).toEqual(123)
})

@@ -363,0 +366,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