Skip to content

Commit 66414f9

Browse files
khoadsnowystingerdannify
authored
issue-1363: Allow null in "selectedKey" to avoid typing problems, doc… (#2676)
* issue-1363: Allow null in "selectedKey" to avoid typing problems, document using "null" to clear key selection * remove workaround example * remove workaround story * Update packages/@react-spectrum/picker/docs/Picker.mdx Co-authored-by: Robert Snow <[email protected]> Co-authored-by: Danni <[email protected]> Co-authored-by: Danni <[email protected]>
1 parent 84ce889 commit 66414f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-types/shared/src/selection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface SingleSelection {
1616
/** Whether the collection allows empty selection. */
1717
disallowEmptySelection?: boolean,
1818
/** The currently selected key in the collection (controlled). */
19-
selectedKey?: Key,
19+
selectedKey?: Key | null,
2020
/** The initial selected key in the collection (uncontrolled). */
2121
defaultSelectedKey?: Key,
2222
/** Handler that is called when the selection changes. */

0 commit comments

Comments
 (0)