Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(listbox): pass missing press events to usePress #4812

Merged
merged 3 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(listbox): pass missing press events to usePress
  • Loading branch information
wingkwong committed Feb 9, 2025
commit 7d66e6258e6bde047782bf8ed5330a1cc0f4a566
8 changes: 8 additions & 0 deletions packages/components/listbox/src/use-listbox-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export function useListboxItem<T extends object>(originalProps: UseListboxItemPr
classNames,
autoFocus,
onPress,
onPressUp,
onPressStart,
onPressEnd,
onPressChange,
onClick: deprecatedOnClick,
shouldHighlightOnFocus,
hideSelectedIcon = false,
Expand Down Expand Up @@ -74,6 +78,10 @@ export function useListboxItem<T extends object>(originalProps: UseListboxItemPr
ref: domRef,
isDisabled: isDisabled,
onPress,
onPressUp,
onPressStart,
onPressEnd,
onPressChange,
});

const {isHovered, hoverProps} = useHover({
Expand Down