Is it possible to add data into react-native-sectioned-multi-select items list while on running in android emulator?

Think of it like this, I have fruits. But on that list, there is no mangos. I want to add mangos right there at the android emulator. There is a search bar, I was thinking of making this search button also a data input field. Is it possible? Here is my simplified example code, it is very identical to this:

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 = [ // this is the parent or 'item' { name: 'Fruits', id: 0, // these are the children or 'sub items' children: [ { 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, }, ], }, { // next parent item },
];
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> ); }
}
Related questions 2 ListView section data (react-native) 8 Adding items to Android React Native Developer menu 1 NativeBase - ReactNative - Dropdown Related questions 2 ListView section data (react-native) 8 Adding items to Android React Native Developer menu 1 NativeBase - ReactNative - Dropdown 0 Can I Push Data Native To React To Native in React Native? 0 React Native Adding array of Picker 2 How to pre select items in react-native-sectioned-multi-select? 0 React Native Multiselect 0 Adding an item to list in React native 3 How can I use DropDown List in Expo React-Native? 2 How to dynamically add data(dropdown list) from api in react-native-select-dropdown? Load 7 more related questions Show fewer related questions Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like