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.

Icons in the label inside the data array

See original GitHub issue

Is it possible to enter icons in the label inside the data array? I need to put several, I get one and two into an array but the app breaks and starts again when I select it … const data = [{ key: index++, label: [<Icon name="ios-man" key={1} size={34} />, <Icon name="ios-man" key={1} size={34} />]}] Magnificent bookstore, thank you!

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
peacechencommented, Jan 18, 2019

The cancel button’s string can be changed with the cancelText prop. https://github.com/peacechen/react-native-modal-selector#props

Thanks for testing the new feature. I’ll publish a new version on NPM soon.

1reaction
peacechencommented, Jan 15, 2019

I added the feature to support custom components in the list. Refer to the Readme for instructions and the SampleApp for a working demo. Simply provide a component key in addition to label in the data set.

image

Please test this by pointing directly to this repo in your package.json:

  "dependencies": {
    "react-native-modal-selector": "git+https://github.com/peacechen/react-native-modal-selector.git",
    ....
  },

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rendering Material-UI icons from an array - Stack Overflow
Very basic. Problem: I would like to include a material-ui icon component in the menuItems array so the icon can be rendered next...
Read more >
From Nested Donuts to an Icon Array | Depict Data Studio
In this post, let's transform an inaccurate, story-less visualization into an accurate, engaging visualization that gets straight to the point.
Read more >
Converting an array/adding labels : r/typescript - Reddit
It works fine. This is why I'm thinking I have to add the label and value fields to my existing name array. Am...
Read more >
How to Create Icon Arrays in Adobe XD - Freshspectrum
You can create an icon array using this approach with any kind of icon you have. It can be shape you've drawn (like...
Read more >
Input | Quasar Framework
The QInput component is used to capture text input from the user. It uses v-model , similar to a regular input. It has...
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