themesberg / themesberg/flowbite-react

Support for placeholder in Dropdown

Open
#1,260 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.1k
Forks
506
PR merge metrics
No merged PRs in 30d

Description

  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Summary

Now the Dropdown has a placeholder property but it seems not being used.
Does it make sense to enable it to be used when the label is not defined?

Maybe I am using it as a select incorrectly, but I don't like the style of the Select floating menu...
If there is another way, any advise will be more than welcome.

Context

In case a dropdown label is initially not defined, it could show the placeholder.
Now I am doing it from my components using:

<Dropdown label={label ?? placeholder} ...

Contributor guide

Open the contributing guide

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 at the Dropdown component and inspect how its existing placeholder property is handled when label is undefined. Confirm the expected behavior from the issue and its current label workaround; done means the placeholder is shown without a label while explicitly provided labels continue to work.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.