diff --git a/README.md b/README.md index 6b144c0f..b1c1e1b4 100644 --- a/README.md +++ b/README.md @@ -91,9 +91,10 @@ this.setState({data: [{ id: 5, name: 'Red Apples' }]}); return ( item.id} - labelExtractor= {(item) => item.name}/> + data={this.state.data} + keyExtractor= {item => item.id} + labelExtractor= {item => item.name} + /> ); ``` @@ -106,8 +107,8 @@ Prop | Type | Optional | Default | Description `onChange` | function | Yes | () => {} | callback function, when the users has selected an option `onModalOpen` | function | Yes | () => {} | callback function, when modal is opening `onModalClose` | function | Yes | () => {} | callback function, when modal is closing -`keyExtractor | function | Yes | (data) => data.key | extract the key from the data item -`labelExtractor | function | Yes | (data) => data.label | extract the label from the data item +`keyExtractor`      | function | Yes     | (data) => data.key   | extract the key from the data item +`labelExtractor`    | function | Yes     | (data) => data.label | extract the label from the data item `initValue` | string | Yes | `Select me!` | text that is initially shown on the button `cancelText` | string | Yes | `cancel` | text of the cancel button `animationType` | string | Yes | `slide` | type of animation to be used to show the modal. Must be one of `none`, `slide` or `fade`.