diff --git a/dist/commonjs/Grid/Grid.js b/dist/commonjs/Grid/Grid.js index d6caad52..529efaa2 100644 --- a/dist/commonjs/Grid/Grid.js +++ b/dist/commonjs/Grid/Grid.js @@ -1041,6 +1041,8 @@ var Grid = onScroll: this._onScroll, role: role, style: _objectSpread(_objectSpread({}, gridStyle), style), + onFocus: this.props['onFocus'], + onBlur: this.props['onBlur'], tabIndex: tabIndex, }, ), @@ -1842,6 +1844,12 @@ var Grid = 'aria-readonly': _propTypes['default'].bool, 'aria-activedescendant': _propTypes['default'].string, + /** Callback invoked when list is focused. */ + onFocus: _propTypes['default'].func, + + /** Callback invoked when list is blured. */ + onBlur: _propTypes['default'].func, + /** * Set the width of the inner scrollable container to 'auto'. * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar. diff --git a/dist/commonjs/List/List.js b/dist/commonjs/List/List.js index c97f3fcd..d517fb70 100644 --- a/dist/commonjs/List/List.js +++ b/dist/commonjs/List/List.js @@ -380,6 +380,12 @@ var List = ).apply(this, arguments); }, + /** Callback invoked when list is focused. */ + onFocus: _propTypes['default'].func, + + /** Callback invoked when list is blured. */ + onBlur: _propTypes['default'].func, + /** Callback invoked with information about the slice of rows that were just rendered. */ onRowsRendered: _propTypes['default'].func.isRequired, diff --git a/dist/es/Grid/Grid.js b/dist/es/Grid/Grid.js index 9c051e21..11a72664 100644 --- a/dist/es/Grid/Grid.js +++ b/dist/es/Grid/Grid.js @@ -983,6 +983,8 @@ var Grid = onScroll: this._onScroll, role: role, style: _objectSpread(_objectSpread({}, gridStyle), style), + onFocus: this.props['onFocus'], + onBlur: this.props['onBlur'], tabIndex: tabIndex, }, ), @@ -1782,6 +1784,12 @@ var Grid = 'aria-readonly': PropTypes.bool, 'aria-activedescendant': PropTypes.string, + /** Callback invoked when list is focused. */ + onFocus: PropTypes.func, + + /** Callback invoked when list is blured. */ + onBlur: PropTypes.func, + /** * Set the width of the inner scrollable container to 'auto'. * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar. diff --git a/dist/es/List/List.js b/dist/es/List/List.js index e00b42ca..814fde8a 100644 --- a/dist/es/List/List.js +++ b/dist/es/List/List.js @@ -337,6 +337,12 @@ var List = ).apply(this, arguments); }, + /** Callback invoked when list is focused. */ + onFocus: PropTypes.func, + + /** Callback invoked when list is blured. */ + onBlur: PropTypes.func, + /** Callback invoked with information about the slice of rows that were just rendered. */ onRowsRendered: PropTypes.func.isRequired, diff --git a/dist/umd/react-virtualized.js b/dist/umd/react-virtualized.js index 2a7497fd..3ae0a1bf 100644 --- a/dist/umd/react-virtualized.js +++ b/dist/umd/react-virtualized.js @@ -4780,6 +4780,8 @@ _objectSpread2({}, gridStyle), style, ), + onFocus: this.props.onFocus, + onBlur: this.props.onBlur, tabIndex: tabIndex, }, ), diff --git a/source/Grid/Grid.js b/source/Grid/Grid.js index 5d6d1003..cd7a6879 100644 --- a/source/Grid/Grid.js +++ b/source/Grid/Grid.js @@ -63,10 +63,10 @@ type Props = { 'aria-activedescendant'?: string, /** Callback invoked when list is focused. */ - onFocus: (params: Event) => void, + onFocus?: (params: Event) => void, /** Callback invoked when list is blured. */ - onBlur: (params: Event) => void, + onBlur?: (params: Event) => void, /** * Set the width of the inner scrollable container to 'auto'. @@ -1061,7 +1061,7 @@ class Grid extends React.PureComponent { ...style, }} onFocus={this.props['onFocus']} - onBLur={this.props['onBlur']} + onBlur={this.props['onBlur']} tabIndex={tabIndex}> {childrenToDisplay.length > 0 && (
void, + onFocus?: (params: Event) => void, /** Callback invoked when list is blured. */ - onBlur: (params: Event) => void, + onBlur?: (params: Event) => void, /** Callback invoked with information about the slice of rows that were just rendered. */ onRowsRendered: (params: RenderedRows) => void,