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.

Allow Custom Component or Label for addCustomItem

See original GitHub issue

First off, this is a great component. Very nicely done.

I have a feature request for allowing more formatting options or the ability to provide a custom component or function when addCustomItem={true}.

Currently, I don’t see a way to indicate in the UX aside from customItemContainerStyle and customItemLabelStyle that tapping the customItem will add a new item. In my particular use case, I would want to include additional text and an icon in the label, such as:

Add [SearchText], and an icon to indicate the “Add” action.

This would help end users to differentiate between adding a new item and selecting an existing one, and would also be potentially more accessible since styling alone does not convey the difference to some users.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
hossein-zarecommented, Dec 13, 2021

Hi again @ericpowell03 ,

You can customize renderListItem https://hossein-zare.github.io/react-native-dropdown-picker-website/docs/advanced/list-and-items#renderlistitem https://github.com/hossein-zare/react-native-dropdown-picker/blob/5.x/src/components/RenderListItem.js

renderListItem={(props) => <Item {...props} />}

// Just an example (pseudocode)
function Item({custom, label, ...}) {
   if (custom)
     return 'Add ' + label;

   return label;
}
1reaction
hossein-zarecommented, Nov 9, 2021

Hi @saeedhabibi ,

Please create a new issue. it’s a bug i guess.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custome field that bahaves like component/labels
Hello, I have created a custom field with multiple choices I want it to behave like labels/component's, I followed this part.
Read more >
Add custom item with null value in jquery's autocomplete
The short answer, it seems to ignore it when you have 1 item in the list to select from. Example: https://jsfiddle.net/Twisty/6oa0yg24/2/
Read more >
Customise Your Tableau Data Story
Enter your custom content. Click Save. Edit story dialog box that has a button that says “Add Custom Item to each.
Read more >
Build Localized Component Labels and Attribute Values on ...
When you specify labels or attributes in the Lightning App Builder such as for components or custom tabs, you can use the {!$Label.customLabelName}...
Read more >
QAbstract3DGraph Class | Qt Data Visualization 6.4.1
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization) ... To specify non-default anti-aliasing for a graph, give a custom surface format as a ...
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