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.

Icon in initValue instead of a string

See original GitHub issue

Would it be possible to set an icon as initialValue? A few months ago, thanks to your help, I was able to put it in the drop-down list but now I also need it in initValue. It works but an warning appears… Warning: Failed prop type: Invalid prop initValue of type object supplied to ModalSelector, expected string.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
peacechencommented, Sep 7, 2019

The warning should be a simple fix. The propType needs to change to accept either a string or object.

Looking through the code, I’m surprised that an icon works for initValue. Would you mind posting a code snippet?

0reactions
peacechencommented, Sep 8, 2019

Fork this project, make the changes to the code & Readme, then create a pull request. https://help.github.com/en/articles/creating-a-pull-request

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to dynamically use icon in a React app based on a string ...
It's simple: <AComponent icon={stringVariable === "icon1" ? Icon1 : Icon2}/>.
Read more >
Flutter Dropdown Button hint text and initial value
It shows an empty string and a user can't change the value because it is disabled. ... Set hint text instead of initial...
Read more >
Combining dynamic member lookup with key paths
... members — but this time using a KeyPath , rather than a String : ... private(set) var value: Value init(value: Value) {...
Read more >
List of icons - Iconify Documentation
To prevent user apps from breaking, icons are never deleted, they are marked as hidden instead, but still can be used in apps....
Read more >
How to Use Icons - Creating a GUI With Swing
public ThumbnailAction(Icon photo, Icon thumb, String desc){ displayPhoto ... load a placeholder instead thumbAction = new ThumbnailAction(placeholderIcon, ...
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