microsoft / microsoft/fluentui

[Feature]: add support for `contentBefore` to Dropdown/Combobox

Open
#27,809 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

The Input component currently supports adding additional elements with the contentBefore/contentAfter properties. In Dropdown/Combobox there is a property called expandIcon which does more or less the same thing as contentAfter but there is no way of adding additional content before.

image image

For example this would be useful to add a "magnifying glass" icon to a Combobox with autocomplete to indicate that it's a searchbox.

MS Teams (which kind of works like a ComboBox but has no expandIcon):
image

Google:
image

Have you discussed this feature with our team

No response

Additional context

No response

Validations
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

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.

Research direction

Start in the React Components / v9 implementation by comparing how Input handles contentBefore/contentAfter with how Dropdown and Combobox handle expandIcon. Add the corresponding before-content API and update the relevant component coverage so a leading element, such as a search icon, renders correctly without disrupting the existing expand icon behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.