Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
erksch committed Jul 30, 2022
1 parent 98ab97f commit c939345
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,22 @@ function CityPicker() {

## Props

| Name | Type | Description |
| ---------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | string[] | Options to be displayed in the wheel picker. Options are rendered from top to bottom, meaning the first item in the options will be at the top and the last at the bottom. |
| selectedIndex | number | Index of the currently selected option. |
| onChange | (index: number) => void | Handler that is called when the selected option changes. |
| visibleRest | number | Amount of additional options that are visible in each direction. Default is 2, resulting in 5 visible options. |
| itemHeight | number | Height of each option in the picker. Default is 40. |
| itemStyle | StyleProp\<ViewStyle\> | Style for the option's container. |
| itemTextStyle | StyleProp\<TextStyle\> | Style for the option's text. |
| containerStyle | StyleProp\<ViewStyle\> | Style of the picker. |
| selectedIndicatorStyle | StyleProp\<ViewStyle\> | Style of overlaying selected-indicator in the middle of the picker. |
| rotationFunction | (x: number) => number | Function to determine the x rotation of items based on their current distance to the center (which is x). Default is ![rotation equation](https://latex.codecogs.com/gif.latex?%5Csmall%20f%28x%29%20%3D%201%20-%20%5Cleft%20%28%201%5Cover2%20%5Cright%20%29%20%5E%7Bx%7D) |
| opacityFunction | (x: number) => number | Function to determine the opacity of items based on their current distance to the center (which is x). Default is ![opacity equation](https://latex.codecogs.com/gif.latex?%5Csmall%20f%28x%29%20%3D%20%5Cleft%20%28%201%5Cover3%20%5Cright%20%29%20%5E%7Bx%7D) |
| decelerationRate | "normal", "fast", number | How quickly the underlying scroll view decelerates after the user lifts their finger. See the [ScrollView docs](https://facebook.github.io/react-native/docs/scrollview.html#decelerationrate). Default is "fast". |
| scrollEventThrottle | number | How often the scroll event will be fired while scrolling (as a time interval in ms). Impacts tradeof between scroll performance and tracking accuracy. See the [ScrollView docs](https://facebook.github.io/react-native/docs/scrollview.html#scrolleventthrottle). Default is 1. |
| Name | Type | Description |
| ------------------------ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options` | `string[]` | Options to be displayed in the wheel picker. Options are rendered from top to bottom, meaning the first item in the options will be at the top and the last at the bottom. |
| `selectedIndex` | `number` | Index of the currently selected option. |
| `onChange` | `(index: number) => void` | Handler that is called when the selected option changes. |
| `visibleRest` | `number` | Amount of additional options that are visible in each direction. Default is 2, resulting in 5 visible options. |
| `itemHeight` | `number` | Height of each option in the picker. Default is 40. |
| `itemStyle` | `StyleProp\<ViewStyle\>` | Style for the option's container. |
| `itemTextStyle` | `StyleProp\<TextStyle\>` | Style for the option's text. |
| `containerStyle` | `StyleProp\<ViewStyle\>` | Style of the picker. |
| `selectedIndicatorStyle` | `StyleProp\<ViewStyle\>` | Style of overlaying selected-indicator in the middle of the picker. |
| `rotationFunction` | `(x: number) => number ` | Function to determine the x rotation of items based on their current distance to the center (which is x). Default is ![rotation equation](https://latex.codecogs.com/gif.latex?%5Csmall%20f%28x%29%20%3D%201%20-%20%5Cleft%20%28%201%5Cover2%20%5Cright%20%29%20%5E%7Bx%7D) |
| `opacityFunction` | `(x: number) => number` | Function to determine the opacity of items based on their current distance to the center (which is x). Default is ![opacity equation](https://latex.codecogs.com/gif.latex?%5Csmall%20f%28x%29%20%3D%20%5Cleft%20%28%201%5Cover3%20%5Cright%20%29%20%5E%7Bx%7D) |
| `decelerationRate` | "normal", "fast", number | How quickly the underlying scroll view decelerates after the user lifts their finger. See the [ScrollView docs](https://facebook.github.io/react-native/docs/scrollview.html#decelerationrate). Default is "fast". |
| `containerProps` | `ViewProps` | Props that are applied to the container which wraps the `FlatList` and the selected indicator. |
| `flatListProps` | `FlatListProps` | Props that are applied to the `FlatList`. |

## Memoization

Expand Down

0 comments on commit c939345

Please sign in to comment.