Skip to content

Commit 74d1f2c

Browse files
author
Kamil Korczynski
committed
docs: update getSelectedItemProps properties
1 parent 8bc8414 commit 74d1f2c

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/hooks/useMultipleSelection/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,10 @@ It is required to pass either `selectedItem` or `index` to
587587

588588
Optional properties:
589589

590+
- `disabled`: If this is set to true, then no event handlers will be returned
591+
from `getSelectedItemProps` and a `disabled` prop will be returned
592+
(effectively disabling `Delete` and `Backspace` keys events).
593+
590594
- `ref`: if you need to access the dropdown element via a ref object, you'd call
591595
the function like this: `getDropdown({ref: yourDropdownRef})`. As a result,
592596
the dropdown element will receive a composed `ref` property, which guarantees

typings/index.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,11 @@ export interface UseMultipleSelectionActions<Item> {
678678
setActiveIndex: (index: number) => void
679679
}
680680

681-
export type UseMultipleSelectionReturnValue<Item> =
682-
UseMultipleSelectionState<Item> &
683-
UseMultipleSelectionPropGetters<Item> &
684-
UseMultipleSelectionActions<Item>
681+
export type UseMultipleSelectionReturnValue<
682+
Item
683+
> = UseMultipleSelectionState<Item> &
684+
UseMultipleSelectionPropGetters<Item> &
685+
UseMultipleSelectionActions<Item>
685686

686687
export interface UseMultipleSelectionInterface {
687688
<Item>(

0 commit comments

Comments
 (0)