mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 01:31:45 +00:00
Split overscanCount into columns and rows
This commit is contained in:
Vendored
+38
-9
@@ -52,15 +52,6 @@ export interface CommonProps {
|
||||
* Tag name passed to document.createElement to create the outer container element. This is an advanced property; in most cases, the default ("div") should be used.
|
||||
*/
|
||||
outerTagName?: string;
|
||||
/**
|
||||
* The number of items (rows or columns) to render outside of the visible area. This property can be important for two reasons:
|
||||
*
|
||||
* - Overscanning by one row or column allows the tab key to focus on the next (not yet visible) item.
|
||||
* - Overscanning slightly can reduce or prevent a flash of empty space when a user first starts scrolling.
|
||||
*
|
||||
* Note that overscanning too much can negatively impact performance. By default, List overscans by one item.
|
||||
*/
|
||||
overscanCount?: number;
|
||||
/**
|
||||
* Optional inline style to attach to outermost <div> element.
|
||||
*/
|
||||
@@ -139,6 +130,15 @@ export interface ListProps extends CommonProps {
|
||||
* If your list does not satisfy the above constraints, use the itemKey property to specify your own keys for items
|
||||
*/
|
||||
itemKey?: ListItemKeySelector;
|
||||
/**
|
||||
* The number of items (rows or columns) to render outside of the visible area. This property can be important for two reasons:
|
||||
*
|
||||
* - Overscanning by one row or column allows the tab key to focus on the next (not yet visible) item.
|
||||
* - Overscanning slightly can reduce or prevent a flash of empty space when a user first starts scrolling.
|
||||
*
|
||||
* Note that overscanning too much can negatively impact performance. By default, List overscans by one item.
|
||||
*/
|
||||
overscanCount?: number;
|
||||
/**
|
||||
* Called when the items rendered by the list change.
|
||||
*/
|
||||
@@ -212,6 +212,35 @@ export interface GridProps extends CommonProps {
|
||||
* Called when the grid scroll positions changes, as a result of user scrolling or scroll-to method calls.
|
||||
*/
|
||||
onScroll?: (props: GridOnScrollProps) => any;
|
||||
/**
|
||||
* The number of columns to render outside of the visible area. This property can be important for two reasons:
|
||||
*
|
||||
* - Overscanning by one row or column allows the tab key to focus on the next (not yet visible) item.
|
||||
* - Overscanning slightly can reduce or prevent a flash of empty space when a user first starts scrolling.
|
||||
*
|
||||
* Note that overscanning too much can negatively impact performance. By default, grid overscans by one item.
|
||||
*/
|
||||
overscanColumnsCount?: number;
|
||||
/**
|
||||
* The number of rows to render outside of the visible area. This property can be important for two reasons:
|
||||
*
|
||||
* - Overscanning by one row or column allows the tab key to focus on the next (not yet visible) item.
|
||||
* - Overscanning slightly can reduce or prevent a flash of empty space when a user first starts scrolling.
|
||||
*
|
||||
* Note that overscanning too much can negatively impact performance. By default, grid overscans by one item.
|
||||
*/
|
||||
overscanRowsCount?: number;
|
||||
/**
|
||||
* The number of items (rows or columns) to render outside of the visible area. This property can be important for two reasons:
|
||||
*
|
||||
* - Overscanning by one row or column allows the tab key to focus on the next (not yet visible) item.
|
||||
* - Overscanning slightly can reduce or prevent a flash of empty space when a user first starts scrolling.
|
||||
*
|
||||
* Note that overscanning too much can negatively impact performance. By default, grid overscans by one item.
|
||||
*
|
||||
* @deprecated since version 1.4.0
|
||||
*/
|
||||
overscanCount?: number;
|
||||
/**
|
||||
* Number of rows in the grid. Note that only a few rows will be rendered and displayed at a time.
|
||||
*/
|
||||
|
||||
@@ -185,7 +185,8 @@ const VariableSizeGridTestOptionalProps: React.SFC = () => (
|
||||
}) => undefined}
|
||||
outerRef={anyRef}
|
||||
outerTagName="div"
|
||||
overscanCount={5}
|
||||
overscanColumnsCount={5}
|
||||
overscanRowsCount={5}
|
||||
ref="ref"
|
||||
style={{ color: "red" }}
|
||||
useIsScrolling={true}
|
||||
|
||||
Reference in New Issue
Block a user