@react-aria/virtualizer
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -250,18 +250,6 @@ var { | ||
if (sizeToFit && contentSize.width > 0 && contentSize.height > 0) { | ||
let style = window.getComputedStyle(dom); | ||
if (sizeToFit === 'width') { | ||
w = contentSize.width; | ||
let maxWidth = parseInt(style.maxWidth, 10); | ||
if (!isNaN(maxWidth)) { | ||
w = Math.min(maxWidth, w); | ||
} | ||
w = Math.min(w, contentSize.width); | ||
} else if (sizeToFit === 'height') { | ||
h = contentSize.height; | ||
let maxHeight = parseInt(style.maxHeight, 10); | ||
if (!isNaN(maxHeight)) { | ||
h = Math.min(maxHeight, h); | ||
} | ||
h = Math.min(h, contentSize.height); | ||
} | ||
@@ -376,3 +364,13 @@ } | ||
if (cached && cached[xProperty] != null) { | ||
return cached; | ||
if (!parent) { | ||
return cached; | ||
} // Invalidate if the parent position changed. | ||
let top = layoutInfo.rect.y - parent.rect.y; | ||
let x = layoutInfo.rect.x - parent.rect.x; | ||
if (cached.top === top && cached[xProperty] === x) { | ||
return cached; | ||
} | ||
} | ||
@@ -389,4 +387,4 @@ | ||
transitionDuration: 'inherit', | ||
width: layoutInfo.rect.width + 'px', | ||
height: layoutInfo.rect.height + 'px', | ||
width: layoutInfo.rect.width, | ||
height: layoutInfo.rect.height, | ||
opacity: layoutInfo.opacity, | ||
@@ -393,0 +391,0 @@ zIndex: layoutInfo.zIndex, |
@@ -211,18 +211,6 @@ import { useLocale } from "@react-aria/i18n"; | ||
if (sizeToFit && contentSize.width > 0 && contentSize.height > 0) { | ||
let style = window.getComputedStyle(dom); | ||
if (sizeToFit === 'width') { | ||
w = contentSize.width; | ||
let maxWidth = parseInt(style.maxWidth, 10); | ||
if (!isNaN(maxWidth)) { | ||
w = Math.min(maxWidth, w); | ||
} | ||
w = Math.min(w, contentSize.width); | ||
} else if (sizeToFit === 'height') { | ||
h = contentSize.height; | ||
let maxHeight = parseInt(style.maxHeight, 10); | ||
if (!isNaN(maxHeight)) { | ||
h = Math.min(maxHeight, h); | ||
} | ||
h = Math.min(h, contentSize.height); | ||
} | ||
@@ -329,3 +317,13 @@ } | ||
if (cached && cached[xProperty] != null) { | ||
return cached; | ||
if (!parent) { | ||
return cached; | ||
} // Invalidate if the parent position changed. | ||
let top = layoutInfo.rect.y - parent.rect.y; | ||
let x = layoutInfo.rect.x - parent.rect.x; | ||
if (cached.top === top && cached[xProperty] === x) { | ||
return cached; | ||
} | ||
} | ||
@@ -342,4 +340,4 @@ | ||
transitionDuration: 'inherit', | ||
width: layoutInfo.rect.width + 'px', | ||
height: layoutInfo.rect.height + 'px', | ||
width: layoutInfo.rect.width, | ||
height: layoutInfo.rect.height, | ||
opacity: layoutInfo.opacity, | ||
@@ -346,0 +344,0 @@ zIndex: layoutInfo.zIndex, |
@@ -41,5 +41,5 @@ import { Direction, Collection } from "@react-types/shared"; | ||
scrollDirection?: 'horizontal' | 'vertical' | 'both'; | ||
transitionDuration?: number; | ||
isLoading?: boolean; | ||
onLoadMore?: () => void; | ||
transitionDuration?: number; | ||
} | ||
@@ -46,0 +46,0 @@ interface VirtualizerOptions { |
{ | ||
"name": "@react-aria/virtualizer", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Spectrum UI components in React", | ||
@@ -22,5 +22,5 @@ "license": "Apache-2.0", | ||
"@react-aria/i18n": "^3.1.0", | ||
"@react-aria/utils": "^3.1.0", | ||
"@react-aria/utils": "^3.2.0", | ||
"@react-stately/virtualizer": "^3.1.0", | ||
"@react-types/shared": "^3.1.0" | ||
"@react-types/shared": "^3.2.0" | ||
}, | ||
@@ -34,3 +34,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "211099972fe75ee581892efd01a7f89dfb9cdf69" | ||
"gitHead": "661f0f2e3b8648a75aae83043267954700059fe0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
140534
1460
Updated@react-aria/utils@^3.2.0
Updated@react-types/shared@^3.2.0