• Jobs
  • About Us
  • Jobs
    • Home
    • Jobs
    • Courses and challenges
  • Businesses
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Hire tech talent
    • Blog
    • Sales
    • Salary Calculator

0

348
Views
¿Cómo cambiar react-native-sectioned-multiple-select a no seccional?

Estoy trabajando en un proyecto nativo de reacción y he importado: https://github.com/renrizzolo/react-native-sectioned-multi-select - En mi proyecto, que se ve así: sección de selección múltiple

Pero quiero convertir esto en una selección de búsqueda única no seccional como esta: ingrese la descripción de la imagen aquí

Entonces, ¿hay alguna manera de hacerlo? He editado el código que encontré en el enlace anterior pero onSelect no funciona allí, aquí está el código que he editado

 import React, { Component } from 'react'; import { View } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialIcons` import SectionedMultiSelect from 'react-native-sectioned-multi-select'; const items = [ { name: 'Apple', id: 10, }, { name: 'Strawberry', id: 17, }, { name: 'Pineapple', id: 13, }, { name: 'Banana', id: 14, }, { name: 'Watermelon', id: 15, }, { name: 'Kiwi fruit', id: 16, }, ]; export default class App extends Component { constructor() { super(); this.state = { selectedItems: [], }; } onSelectedItemsChange = (selectedItems) => { this.setState({ selectedItems }); }; render() { return ( <View> <SectionedMultiSelect items={items} IconRenderer={Icon} uniqueKey="id" subKey="children" selectText="Choose some things..." showDropDowns={true} readOnlyHeadings={true} onSelectedItemsChange={this.onSelectedItemsChange} selectedItems={this.state.selectedItems} /> </View> ); } }
almost 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!