microsoft / microsoft/fluentui

[Feature] Slots: a way to properly merge refs on slots declarations

Open
#29,777 5 comments 0 reactions 1 assignee View on GitHub

@bsunderhus is already working on this.

Since Nov 7, 2023.

Fluent UI react-components (v9) Needs: Discussion Package: utilities Resolution: Soft Close Type: Feature
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Example code from combobox:

https://github.com/microsoft/fluentui/blob/a16f104e5ae9da7a2fb74259fb67ae1479eb00a5/packages/react-components/react-combobox/src/components/Combobox/useCombobox.tsx#L181-L188

There is no way to merge a ref to a slot. The value of a slot is unknown until it is normalized in the slot.always or slot.optional factories. In this case, there is always a step afterwards needed to merge an internal ref on a slot

There should be a way to create a slot and merge refs to that new slot at the same time

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.