@react-aria/selection
Advanced tools
Comparing version 3.0.0-nightly.748 to 3.0.0-nightly.752
@@ -478,21 +478,5 @@ var { | ||
let onSelect = e => { | ||
if (manager.selectionMode === 'none') { | ||
return; | ||
} | ||
let onSelect = e => manager.select(key, e); // Focus the associated DOM node when this item becomes the focusedKey | ||
if (manager.selectionMode === 'single') { | ||
if (manager.isSelected(key) && !manager.disallowEmptySelection) { | ||
manager.toggleSelection(key); | ||
} else { | ||
manager.replaceSelection(key); | ||
} | ||
} else if (e.shiftKey) { | ||
manager.extendSelection(key); | ||
} else if (manager) { | ||
manager.toggleSelection(key); | ||
} | ||
}; // Focus the associated DOM node when this item becomes the focusedKey | ||
let isFocused = key === manager.focusedKey; | ||
@@ -499,0 +483,0 @@ useEffect(() => { |
@@ -455,21 +455,5 @@ import { useCollator } from "@react-aria/i18n"; | ||
let onSelect = e => { | ||
if (manager.selectionMode === 'none') { | ||
return; | ||
} | ||
let onSelect = e => manager.select(key, e); // Focus the associated DOM node when this item becomes the focusedKey | ||
if (manager.selectionMode === 'single') { | ||
if (manager.isSelected(key) && !manager.disallowEmptySelection) { | ||
manager.toggleSelection(key); | ||
} else { | ||
manager.replaceSelection(key); | ||
} | ||
} else if (e.shiftKey) { | ||
manager.extendSelection(key); | ||
} else if (manager) { | ||
manager.toggleSelection(key); | ||
} | ||
}; // Focus the associated DOM node when this item becomes the focusedKey | ||
let isFocused = key === manager.focusedKey; | ||
@@ -476,0 +460,0 @@ useEffect(() => { |
{ | ||
"name": "@react-aria/selection", | ||
"version": "3.0.0-nightly.748+6e9f55a7", | ||
"version": "3.0.0-nightly.752+d6206f77", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,9 +21,9 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/focus": "3.0.0-nightly.748+6e9f55a7", | ||
"@react-aria/i18n": "3.0.0-nightly.748+6e9f55a7", | ||
"@react-aria/interactions": "3.0.0-nightly.748+6e9f55a7", | ||
"@react-aria/utils": "3.0.0-nightly.748+6e9f55a7", | ||
"@react-stately/collections": "3.0.0-nightly.748+6e9f55a7", | ||
"@react-stately/selection": "3.0.0-nightly.748+6e9f55a7", | ||
"@react-types/shared": "3.0.0-nightly.748+6e9f55a7" | ||
"@react-aria/focus": "3.0.0-nightly.752+d6206f77", | ||
"@react-aria/i18n": "3.0.0-nightly.752+d6206f77", | ||
"@react-aria/interactions": "3.0.0-nightly.752+d6206f77", | ||
"@react-aria/utils": "3.0.0-nightly.752+d6206f77", | ||
"@react-stately/collections": "3.0.0-nightly.752+d6206f77", | ||
"@react-stately/selection": "3.0.0-nightly.752+d6206f77", | ||
"@react-types/shared": "3.0.0-nightly.752+d6206f77" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "6e9f55a7cebf5f61cdd89057f7cc8b00d021d4d7" | ||
"gitHead": "d6206f778338e478a9dfa0589bd79cecd97c403c" | ||
} |
@@ -72,20 +72,4 @@ /* | ||
let onSelect = (e: PressEvent | PointerEvent) => { | ||
if (manager.selectionMode === 'none') { | ||
return; | ||
} | ||
let onSelect = (e: PressEvent | PointerEvent) => manager.select(key, e); | ||
if (manager.selectionMode === 'single') { | ||
if (manager.isSelected(key) && !manager.disallowEmptySelection) { | ||
manager.toggleSelection(key); | ||
} else { | ||
manager.replaceSelection(key); | ||
} | ||
} else if (e.shiftKey) { | ||
manager.extendSelection(key); | ||
} else if (manager) { | ||
manager.toggleSelection(key); | ||
} | ||
}; | ||
// Focus the associated DOM node when this item becomes the focusedKey | ||
@@ -92,0 +76,0 @@ let isFocused = key === manager.focusedKey; |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
196731
2277