@react-stately/grid
Advanced tools
Comparing version 3.0.0-alpha.2 to 3.0.0-beta.0
@@ -17,2 +17,5 @@ var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends")); | ||
/** | ||
* Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable. | ||
*/ | ||
function useGridState(props) { | ||
@@ -19,0 +22,0 @@ let { |
import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends"; | ||
import { SelectionManager, useMultipleSelectionState } from "@react-stately/selection"; | ||
import { useEffect, useMemo } from "react"; | ||
/** | ||
* Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable. | ||
*/ | ||
export function useGridState(props) { | ||
@@ -5,0 +9,0 @@ let { |
@@ -7,3 +7,5 @@ import { GridCollection as _GridCollection1, GridNode, GridRow } from "@react-types/grid"; | ||
collection: C; | ||
/** A set of keys for rows that are disabled. */ | ||
disabledKeys: Set<Key>; | ||
/** A selection manager to read and update row selection state. */ | ||
selectionManager: SelectionManager; | ||
@@ -16,2 +18,5 @@ } | ||
} | ||
/** | ||
* Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable. | ||
*/ | ||
export function useGridState<T extends object, C extends _GridCollection1<T>>(props: GridStateOptions<T, C>): GridState<T, C>; | ||
@@ -18,0 +23,0 @@ interface GridCollectionOptions<T> { |
{ | ||
"name": "@react-stately/grid", | ||
"version": "3.0.0-alpha.2", | ||
"version": "3.0.0-beta.0", | ||
"description": "Spectrum UI components in React", | ||
@@ -22,3 +22,3 @@ "license": "Apache-2.0", | ||
"@react-stately/selection": "^3.5.0", | ||
"@react-types/grid": "3.0.0-alpha.0", | ||
"@react-types/grid": "3.0.0-beta.0", | ||
"@react-types/shared": "^3.6.0" | ||
@@ -32,3 +32,3 @@ }, | ||
}, | ||
"gitHead": "3aae08e7d8a75382bedcddac7c86107e40db9296" | ||
"gitHead": "83b70255d97b3068988f8972e9c9a39a7352926e" | ||
} |
@@ -8,3 +8,5 @@ import {GridCollection} from '@react-types/grid'; | ||
collection: C, | ||
/** A set of keys for rows that are disabled. */ | ||
disabledKeys: Set<Key>, | ||
/** A selection manager to read and update row selection state. */ | ||
selectionManager: SelectionManager | ||
@@ -19,2 +21,5 @@ } | ||
/** | ||
* Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable. | ||
*/ | ||
export function useGridState<T extends object, C extends GridCollection<T>>(props: GridStateOptions<T, C>): GridState<T, C> { | ||
@@ -21,0 +26,0 @@ let {collection, focusMode} = props; |
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
58318
579
+ Added@react-types/grid@3.0.0-beta.0(transitive)
- Removed@react-types/grid@3.0.0-alpha.0(transitive)