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 ComboBox typings for trigger props #258

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Fix ComboBox typings for trigger props #258

merged 1 commit into from
Jul 12, 2023

Conversation

LamaEats
Copy link
Contributor

@LamaEats LamaEats commented Jul 11, 2023

PR includes

  • Bug Fix

Related issues

Resolve #257

QA Instructions, Screenshots, Recordings

in all place where ComboBox using with renderTrigger prop may pass generic type for trigger element ref
Otherwise type will be calculated as HTMLElement

// in this case ref prop will have `HTMLSpanElement` as type on ref element
<ComboBox<HTMLSpanElement>
    renderTrigger={({ ref }) => <span ref={ref}>trigger</span>}
    ...
/>

...

// in this case ref prop will have `HTMLElement` as type on ref element by default
<ComboBox
    renderTrigger={({ ref }) => <span ref={ref}>trigger</span>}
    ...
/>

src/components/ComboBox.tsx Show resolved Hide resolved
@LamaEats LamaEats merged commit aece6af into main Jul 12, 2023
2 checks passed
@LamaEats LamaEats deleted the issues/257 branch July 12, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix ComboBox typings for trigger props
2 participants