Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lovely-snakes-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Fixed incompatible type between IndexTable and useIndexResourceState
2 changes: 2 additions & 0 deletions polaris-react/src/utilities/use-index-resource-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export function useIndexResourceState<T extends {[key: string]: unknown}>(
selectionType: SelectionType,
isSelecting: boolean,
selection?: string | Range,
// This is not used in the function, but needed to keep the type compatible with IndexProviderProps onSelectionChange
_position?: number,
) => {
if (selectionType === SelectionType.All) {
setAllResourcesSelected(isSelecting);
Expand Down