07-17-2019 23:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-17-2019 23:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi guys,
In Settings, is there a way to create a select list where each item contains a text image along side the name? Below is what I am trying to achieve but, I cannot get the image to come up.
<Select label="Select with TextImageRow" options={[ { name: 'Label1', value: {location: 'Sub-Label', icon: 'https://xyz'} }, { name: 'Label2', value: {location: 'Sub-Label', icon: 'https://xyz'} }, { name: 'Label3',value: {location: 'Sub-Label', icon: 'https://xyz'} }, { name: 'Label4', value: {location: 'Sub-Label', icon: 'https://xyz'} }, { name: 'Label5', value: {location: 'Sub-Label', icon: 'https://xyz'} } ]} />
Answered! Go to the Best Answer.

Accepted Solutions
07-17-2019 23:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-17-2019 23:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I used this:
renderItem={ (option) => <TextImageRow label={option.name} icon={colIcons[option.value]} /> }
Gondwana Software

07-17-2019 23:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-17-2019 23:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I used this:
renderItem={ (option) => <TextImageRow label={option.name} icon={colIcons[option.value]} /> }
Gondwana Software

07-18-2019 00:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-18-2019 00:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Awesome! Thanks Catplace. That worked well.
For anyone else, below is the code I used in settings/index.jsx
const colIcons=['https://tinyurl.com/ybbmpxxq','https://tinyurl.com/ybbmpxxq','https://tinyurl.com/ybbmpxxq']; function mySettings(props) { return ( <Page> <Select label="Selection with icons" settingsKey="listKey" options={[ { name: 'Label1', value: 0 }, { name: 'Label2', value: 1}, { name: 'Label3', value: 2} ]} renderItem={ (options) => <TextImageRow label={options.name} icon={colIcons[options.value]} /> } /> </Page> ); }
07-29-2019 21:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-29-2019 21:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
How did you retrieve those keys in the index.js?

07-29-2019 21:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-29-2019 21:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi Dcable,
That is correct. There is a good example of this in the part ‘settings in action’:
https://dev.fitbit.com/build/guides/settings/

