downshift-js / downshift-js/downshift

Using external label instead of getLabelProps

Open
#1,682 1 comment 0 reactions 0 assignees View on GitHub
question waiting for author
Dominant language
JavaScript
Stars
12.3k
Forks
936
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have a component that conditionally renders a `` (desktop) or a dialog (mobile). It’s usually used under an existing ``, and I pass the label’s id down to associate it with the control. With `useSelect`, it seems like `getLabelProps` assumes the hook owns the label.

What's the recommended way to use `useSelect` with an already-existing label? Should I pass a `labelId` and skip `getLabelProps` entirely, or is there a better pattern for this?

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.