New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-menu-list

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-menu-list

react-native menun list modal, alternative to native picker

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

react-native-menu-list

an alternative to react-native Picker component, cross-platform, iOS style menu for react-native.

Preview

ScreenShot

Installation

npm install --save react-native-menu-list

Properties

PropOptionalDefaultDescription
dataNo[]array of items to be shown in menu list
onChangeYes() => {}callback function, when the users has selected an option
keyExtractorYes(data) => data.key
labelExtractorYes(data) => data.label
firstTitleTextYesTap Top Open!text that is shown on the button before selection
styleYesstylestyle of main container
itemButtonStyleYesstyle.
itemButtonTextStyleYesstyle.
itemStyleYesstyle.
itemTextStyleYesstyle.
itemContainerStyleYesstyle.
childrenViewStyleYesstyle.
openButtonStyleYesstyle.
closeContainerStyleYesstyle.
closeStyleYesstyle.
closeTextStyleYesstyle.
closeTextYesClosetext of the close button.
disabledYesfalsemenu is not able to show up if disabled is set to true.
selectedKeyYes''Key of item to be selected on start up

Example


export default class App extends React.Component {

    data = [
        { id: 0, name: "item 1" },
        { id: 1, name: "item 2" },
        { id: 0, name: "item 3" },
        { id: 1, name: "item 4" },
        { id: 0, name: "item 5" },
        { id: 1, name: "item 6" }
    ];

    data2 = [
        { number: 0, label: "item 1" },
        { number: 1, label: "item 2" },
        { number: 0, label: "item 3" },
        { number: 1, label: "item 4" },
        { number: 0, label: "item 5" },
        { number: 1, label: "item 6" }
    ];

    render() {
        return (
            <View>
                <MenuList
                    data={this.data}
                />

                <MenuList
                    data={this.data2}
                    keyExtractor={item => item.number}
                    labelExtractor={item => item.label}
                />
            </View>
        );
    }
}

Keywords

menu

FAQs

Package last updated on 14 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts