rc-virtual-list
Advanced tools
Comparing version 0.0.0-alpha.10 to 0.0.0-alpha.11
@@ -19,3 +19,3 @@ import * as React from 'react'; | ||
itemHeight?: number; | ||
itemKey: string; | ||
itemKey: string | ((item: T) => string); | ||
component?: string | React.FC<any> | React.ComponentClass<any>; | ||
@@ -22,0 +22,0 @@ disabled?: boolean; |
@@ -150,3 +150,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
return item ? item[itemKey] : null; | ||
return typeof itemKey === 'function' ? itemKey(item) : item[itemKey]; | ||
}; | ||
@@ -153,0 +153,0 @@ /** |
@@ -19,3 +19,3 @@ import * as React from 'react'; | ||
itemHeight?: number; | ||
itemKey: string; | ||
itemKey: string | ((item: T) => string); | ||
component?: string | React.FC<any> | React.ComponentClass<any>; | ||
@@ -22,0 +22,0 @@ disabled?: boolean; |
@@ -165,3 +165,3 @@ "use strict"; | ||
return item ? item[itemKey] : null; | ||
return typeof itemKey === 'function' ? itemKey(item) : item[itemKey]; | ||
}; | ||
@@ -168,0 +168,0 @@ /** |
{ | ||
"name": "rc-virtual-list", | ||
"version": "0.0.0-alpha.10", | ||
"version": "0.0.0-alpha.11", | ||
"description": "React Virtual List Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87436