You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interfaceUseListSelectionOptions<TItem,TItemValue=TItem>{/** * Use ref has selection state */selectionModel?: Ref<TItem|TItem[]>mandatory?: MaybeRef<boolean>multiple?: MaybeRef<boolean>disabled?: MaybeRef<boolean>/** * In case of object array, allowe to select the raw data */selectRaw?: MaybeRef<boolean>/** * In case of object array, custom item value key/getter */itemValue?: string|(item: TItem)=>string}interfaceUseListSelectionReturn<TItem,TItemValue=TItem>{toggle: (item: TItemValue)=>voidselect: (item: TItemValue)=>voidisSelected: (value: TItemValue)=>booleanstate: Ref<TItem|TItem[]>}exportdeclarefunctionuseListSelection<TItem,TItemValue=TItem>(list: MaybeRef<TItem[]>,options?: UseListSelectionOptions<TItem,TItemValue>,): UseListSelectionReturn<TItem,TItemValue>
Clear and concise description of the problem
It's not uncommon to have to manage selection of items in a list with varying degrees of constraint (multiple, mandatory, etc).
A composable like
useListSelection
that would allow you to select or toggle a selection state in a list from different options could be quite useful.Suggested solution
Usage
Basic
Object list
Type Declarations
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: