如何将图像放在文本内react-native-modal-dropdown

时间:2018-08-08 18:34:03

标签: react-native

我使用组件react-native-modal-dropdown并拥有一个商店数组,当我选择一个商品时,我需要在名称旁边显示商店的图像,与选项中显示的名称相同< / p>

const tiendas = [
{nombre: "MV-01 GD", clave: 'MV-01', consorcio: 'GRAND'},
{nombre: "MV-02 SORIANA", clave: 'MV-02', consorcio: 'SORIANA'},
{nombre: "MV-03 IBARRA", clave: 'MV-03', consorcio: 'IBARRA'},
{nombre: "MV-01 IBARRA", clave: 'MV-04', consorcio: 'IBARRA'},
{nombre: "MV-01 GD", clave: 'MV-05', consorcio: 'GRAND'},
{nombre: "MV-01 SORIANA", clave: 'MV-06', consorcio: 'SORIANA'},
{nombre: "MV-01 CHEDRAUI", clave: 'MV-07', consorcio: 'CHEDRAUI'},
];

<ModalDropdown
   ref="dropdownTienda"
   defaultValue="Selecciona una tienda para visitar &#9660;"
   style={styles.dropdownTienda}
   textStyle={styles.dropdownTiendaTexto}
   dropdownStyle={styles.dropdownTiendaDropdown}
   options={tiendas}
   renderButtonText={(rowData) => this._dropdownTienda_renderButtonText(rowData)}
   renderRow={this._dropdownTienda_renderRow.bind(this)}
   renderSeparator={(sectionID, rowID, adjacentRowHighlighted) => this._dropdownTienda_renderSeparador(sectionID, rowID, adjacentRowHighlighted)}
/>

enter image description here

我想在文本旁边显示图片,就像在选项

中一样

0 个答案:

没有答案