Skip to content

Commit 9316a00

Browse files
committed
Deprecated onSelectionChange (#plugins-292)
1 parent 641b160 commit 9316a00

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/components/src/spectrum/picker/Picker.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ export type PickerProps = {
2121
defaultSelectedKey?: PickerItemKey;
2222
/**
2323
* Handler that is called when the selection change.
24-
* Note that this is just an alias for `onSelectionChange` for better
25-
* consistency with other components.
24+
* Note that under the hood, this is just an alias for Spectrum's
25+
* `onSelectionChange`. We are renaming for better consistency with other
26+
* components.
2627
*/
2728
onChange?: (key: PickerItemKey) => void;
28-
/** Handler that is called when the selection changes. */
29+
/**
30+
* Handler that is called when the selection changes.
31+
* @deprecated Use `onChange` instead
32+
*/
2933
onSelectionChange?: (key: PickerItemKey) => void;
3034
} /*
3135
* Support remaining SpectrumPickerProps.

0 commit comments

Comments
 (0)