question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropdown Text Prop

See original GitHub issue

Bug Report

Dropdown allows passing text prop that will be later rendered inside of your dropdown component. In reality any react node is working because it is rendered as {text} internally but PropType checking errors since in expects string. It might be reasonable to relax PropTypes constraints since it working anyways but it will be slightly stupid because text name implies passing a string as opposed to content.

Why am I even doing that if there is a label prop?

label prop overrides dropdown arrow icon and I want to have a clear indication that there is dropdown available and another icon at the same time:

screen shot 2018-07-12 at 13 01 52

Version

0.81.1

Testcase

https://codesandbox.io/s/1v80o4ykr3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ecnaidarcommented, Jul 12, 2018

@levithomason Hoped I won’t be that person who can’t read. Thanks for link and sorry for disturbance.

0reactions
ecnaidarcommented, Jul 13, 2018

@levithomason Depending on how documentation is generated potentially cheap improvement might be having a link next to prop that directs to example showcasing prop usage and the other way around.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown | Components - BootstrapVue
You can customize the text of the dropdown button by using either the text prop (shown in previous examples), or use the button-content...
Read more >
Can the value and text properties of a dropdown list be used ...
Yes, it's clear now, thanks. The problem is that you are accessing the Text property of the DropDownList rather than the Text property...
Read more >
Dropdown text prop of type string #2056 - GitHub
Hello guys, I bumped in to a use case, where I want a dropdown that has custom icon along with the default dropdown...
Read more >
Dropdowns Components | React Widgets
React widgets has three dropdown components: <Combobox> , <DropdownList> , and <Multiselect> each share a large amount of functionality but are designed to...
Read more >
Dropdown - Semantic UI React
HeaderDropdown.ItemDropdown.MenuDropdown.SearchInputDropdown.Text ... The shorthand props API fully manages state but needs to be extended to support the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found