Skip to content

Commit

Permalink
rename context method
Browse files Browse the repository at this point in the history
  • Loading branch information
f0rr0 committed Oct 18, 2024
1 parent 2db6715 commit 503f4c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmdk/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type Context = {
group: (id: string) => () => void
filter: () => boolean
label: string
shouldDisablePointerSelection: () => boolean
getDisablePointerSelection: () => boolean
// Ids
listId: string
labelId: string
Expand Down Expand Up @@ -342,7 +342,7 @@ const Command = React.forwardRef<HTMLDivElement, CommandProps>((props, forwarded
return propsRef.current.shouldFilter
},
label: label || props['aria-label'],
shouldDisablePointerSelection: () => {
getDisablePointerSelection: () => {
return propsRef.current.disablePointerSelection
},
listId,
Expand Down Expand Up @@ -706,7 +706,7 @@ const Item = React.forwardRef<HTMLDivElement, ItemProps>((props, forwardedRef) =
aria-selected={Boolean(selected)}
data-disabled={Boolean(disabled)}
data-selected={Boolean(selected)}
onPointerMove={disabled || context.shouldDisablePointerSelection() ? undefined : select}
onPointerMove={disabled || context.getDisablePointerSelection() ? undefined : select}
onClick={disabled ? undefined : onSelect}
>
{props.children}
Expand Down

0 comments on commit 503f4c2

Please sign in to comment.