-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(Dropdown): use placeholder
as default text
#3586
Conversation
💖 Thanks for opening this pull request! 💖 Here is a list of things that will help get it across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report
@@ Coverage Diff @@
## master #3586 +/- ##
==========================================
- Coverage 99.83% 99.83% -0.01%
==========================================
Files 174 174
Lines 3105 3103 -2
==========================================
- Hits 3100 3098 -2
Misses 5 5
Continue to review full report at Codecov.
|
Sorry for the late feedback. I want to check this change additionally because it was not covered by unit tests before 😮 |
Hi @layershifter! Any word on this PR? Is there anything I might be able to do to help with testing to expedite this? |
searchQuery
as text
placeholder
as default text
@mattgd @eyas2014 thank you for contributions and follow ups 👍 I checked this issue deeply and <div class="ui floating dropdown labeled search button icon active visible">
<input class="search" autocomplete="off" tabindex="0" value="VALUE" />
<span class="text filtered">PLACEHOLDER</span>
</div> |
@@ -1193,9 +1193,8 @@ export default class Dropdown extends Component { | |||
search && searchQuery && 'filtered', | |||
) | |||
let _text = placeholder | |||
if (searchQuery) { | |||
_text = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUI renders text
always and has styles to make it invisible 🐙
Fixes #3581.
We should always display some
text
indiv.text
because SUI does the same thing: https://semantic-ui.com/modules/dropdown.html Actually, this is also an answer why we don't have any unit tests for this behavior.SUI has styles that will prevent visibility off
div.text
: