diff --git a/releases/next/docs/activityindicator.html b/releases/next/docs/activityindicator.html index f58e85bb485..5d576265185 100644 --- a/releases/next/docs/activityindicator.html +++ b/releases/next/docs/activityindicator.html @@ -1,5 +1,8 @@ -
Displays a circular loading indicator.
Whether to show the indicator (true, the default) or hide it (false).
Size of the indicator (default is 'small'). -Passing a number to the size prop is only supported on Android.
Whether the indicator should hide when not animating (true by default).
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Displays a circular loading indicator.
Whether to show the indicator (true, the default) or hide it (false).
Size of the indicator (default is 'small'). +Passing a number to the size prop is only supported on Android.
Whether the indicator should hide when not animating (true by default).
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
onDateChange callback
and update the date prop in order for the component to update, otherwise
the user's change will be reverted immediately to reflect props.date as the
-source of truth.The currently selected date.
Maximum date.
Restricts the range of possible date/time values.
Minimum date.
Restricts the range of possible date/time values.
The interval at which minutes can be selected.
The date picker mode.
Date change handler.
This is called when the user changes the date or time in the UI. +source of truth.
The currently selected date.
Maximum date.
Restricts the range of possible date/time values.
Minimum date.
Restricts the range of possible date/time values.
The interval at which minutes can be selected.
The date picker mode.
Date change handler.
This is called when the user changes the date or time in the UI. The first and only argument is a Date object representing the new -date and time.
Timezone offset in minutes.
By default, the date picker will use the device's timezone. With this +date and time.
Timezone offset in minutes.
By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. For instance, to show times in Pacific Standard Time, pass -7 * 60.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
drawerWidth prop.Example:
Specifies the lock mode of the drawer. The drawer can be locked in 3 states: +);
Specifies the lock mode of the drawer. The drawer can be locked in 3 states:
- unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.
- locked-closed, meaning that the drawer will stay closed and not respond to gestures.
- locked-open, meaning that the drawer will stay opened and not respond to gestures.
-The drawer may still be opened and closed programmatically (openDrawer/closeDrawer).
Specifies the side of the screen from which the drawer will slide in.
Specifies the width of the drawer, more precisely the width of the view that be pulled in -from the edge of the window.
Determines whether the keyboard gets dismissed in response to a drag.
+The drawer may still be opened and closed programmatically (openDrawer/closeDrawer).
Specifies the side of the screen from which the drawer will slide in.
Specifies the width of the drawer, more precisely the width of the view that be pulled in +from the edge of the window.
Determines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - - 'on-drag', the keyboard is dismissed when a drag begins.
Function called whenever the navigation view has been closed.
Function called whenever the navigation view has been opened.
Function called whenever there is an interaction with the navigation view.
Function called when the drawer state has changed. The drawer can be in 3 states: + - 'on-drag', the keyboard is dismissed when a drag begins.
Function called whenever the navigation view has been closed.
Function called whenever the navigation view has been opened.
Function called whenever there is an interaction with the navigation view.
Function called when the drawer state has changed. The drawer can be in 3 states: - idle, meaning there is no interaction with the navigation view happening at the time - dragging, meaning there is currently an interaction with the navigation view - settling, meaning that there was an interaction with the navigation view, and the -navigation view is now finishing its closing or opening animation
The navigation view that will be rendered to the side of the screen and can be pulled in.
Make the drawer take the entire screen and draw the background of the +navigation view is now finishing its closing or opening animation
The navigation view that will be rendered to the side of the screen and can be pulled in.
You can edit the content above on GitHub and send us a pull request!
It is a component to solve the common problem of views that need to move out of the way of the virtual keyboard. -It can automatically adjust either its position or bottom padding based on the position of the keyboard.
The style of the content container(View) when behavior is 'position'.
This is the distance between the top of the user screen and the react native view, +It can automatically adjust either its position or bottom padding based on the position of the keyboard.
The style of the content container(View) when behavior is 'position'.
This is the distance between the top of the user screen and the react native view, may be non-zero in some use cases.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
alignContent controls how a rows align in the cross direction,
+
alignContent controls how rows align in the cross direction,
overriding the alignContent of the parent.
See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content
for more details.
alignItems aligns children in the cross direction.
diff --git a/releases/next/docs/linking-libraries-ios.html b/releases/next/docs/linking-libraries-ios.html
index 6459da46d4f..b43707a22bf 100644
--- a/releases/next/docs/linking-libraries-ios.html
+++ b/releases/next/docs/linking-libraries-ios.html
@@ -6,7 +6,7 @@ the root of the repository. Some of them are pure JavaScript, and you only need
to require it. Other libraries also rely on some native code, in that case
you'll have to add these files to your app, otherwise the app will throw an
error as soon as you try to use the library.
Install a library with native dependencies:
Note: --save or --save-dev flag is very important for this step. React Native will link
-your libs based on dependencies and devDependencies in your package.json file.
Link your native dependencies:
Done! All libraries with a native dependencies should be successfully linked to your iOS/Android project.
If the library has native code, there must be a .xcodeproj file inside it's
+your libs based on dependencies and devDependencies in your package.json file.
Link your native dependencies:
Done! All libraries with native dependencies should be successfully linked to your iOS/Android project.
If the library has native code, there must be a .xcodeproj file inside it's
folder.
Drag this file to your project on Xcode (usually under the Libraries group
on Xcode);

Click on your main project file (the one that represents the .xcodeproj)
diff --git a/releases/next/docs/linking.html b/releases/next/docs/linking.html
index 1d54886a577..a15ee729719 100644
--- a/releases/next/docs/linking.html
+++ b/releases/next/docs/linking.html
@@ -15,7 +15,7 @@ documentation for more information.
NOTE: On iOS you'll need to link RCTLinking to your project by following
the steps described here.
In case you also want to listen to incoming app links during your app's
-execution you'll need to add the following lines to you *AppDelegate.m:
*AppDelegate.m:Info.plist or canOpenURL will always return false.@pa
it will give the link url, otherwise it will give null
NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
nullNOTE: class OpenURLButton extends React.Component { static propTypes = { - url: React.PropTypes.string, + url: PropTypes.string, }; handleClick = () => { diff --git a/releases/next/docs/listview.html b/releases/next/docs/listview.html index b118ab9a6ef..4d8cacb8268 100644 --- a/releases/next/docs/listview.html +++ b/releases/next/docs/listview.html @@ -31,42 +31,42 @@ data source tells the ListView if it needs to re-render a row because the source data has changed - see ListViewDataSource for more details.
Rate-limited row rendering - By default, only one row is rendered per
event-loop (customizable with the pageSize prop). This breaks up the
work into smaller chunks to reduce the chance of dropping frames while
-rendering rows.
An instance of ListView.DataSource to use
Flag indicating whether empty section headers should be rendered. In the future release +rendering rows.
An instance of ListView.DataSource to use
Flag indicating whether empty section headers should be rendered. In the future release empty section headers will be rendered by default, and the flag will be deprecated. -If empty sections are not desired to be rendered their indices should be excluded from sectionID object.
How many rows to render on initial component mount. Use this to make +If empty sections are not desired to be rendered their indices should be excluded from sectionID object.
How many rows to render on initial component mount. Use this to make it so that the first screen worth of data appears at one time instead of -over the course of multiple frames.
(visibleRows, changedRows) => void
Called when the set of visible rows changes. visibleRows maps
+over the course of multiple frames.
(visibleRows, changedRows) => void
Called when the set of visible rows changes. visibleRows maps
{ sectionID: { rowID: true }} for all the visible rows, and
changedRows maps { sectionID: { rowID: true | false }} for the rows
that have changed their visibility, with true indicating visible, and
-false indicating the view has moved out of view.
Called when all rows have been rendered and the list has been scrolled +false indicating the view has moved out of view.
Called when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll -event is provided.
Threshold in pixels (virtual, not physical) for calling onEndReached.
Number of rows to render per event loop. Note: if your 'rows' are actually +event is provided.
Threshold in pixels (virtual, not physical) for calling onEndReached.
Number of rows to render per event loop. Note: if your 'rows' are actually cells, i.e. they don't span the full width of your view (as in the ListViewGridLayoutExample), you should set the pageSize to be a multiple of the number of cells per row, otherwise you're likely to see gaps at -the edge of the ListView as new pages are loaded.
A performance optimization for improving scroll perf of +the edge of the ListView as new pages are loaded.
A performance optimization for improving scroll perf of large lists, used in conjunction with overflow: 'hidden' on the row -containers. This is enabled by default.
() => renderable
The header and footer are always rendered (if these props are provided) +containers. This is enabled by default.
() => renderable
The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always -at the bottom of the list, and header at the top, on every render pass.
(rowData, sectionID, rowID, highlightRow) => renderable
Takes a data entry from the data source and its ids and should return +at the bottom of the list, and header at the top, on every render pass.
(rowData, sectionID, rowID, highlightRow) => renderable
Takes a data entry from the data source and its ids and should return
a renderable component to be rendered as the row. By default the data
is exactly what was put into the data source, but it's also possible to
provide custom extractors. ListView can be notified when a row is
being highlighted by calling highlightRow(sectionID, rowID). This
sets a boolean value of adjacentRowHighlighted in renderSeparator, allowing you
to control the separators above and below the highlighted row. The highlighted
-state of a row can be reset by calling highlightRow(null).
(props) => renderable
A function that returns the scrollable component in which the list rows -are rendered. Defaults to returning a ScrollView with the given props.
(sectionData, sectionID) => renderable
If provided, a header is rendered for this section.
(sectionID, rowID, adjacentRowHighlighted) => renderable
If provided, a renderable component to be rendered as the separator +state of a row can be reset by calling highlightRow(null).
(props) => renderable
A function that returns the scrollable component in which the list rows +are rendered. Defaults to returning a ScrollView with the given props.
(sectionData, sectionID) => renderable
If provided, a header is rendered for this section.
(sectionID, rowID, adjacentRowHighlighted) => renderable
If provided, a renderable component to be rendered as the separator below each row but not the last row if there is a section header below. Take a sectionID and rowID of the row above and whether its adjacent row -is highlighted.
How early to start rendering rows before they come on screen, in -pixels.
An array of child indices determining which children get docked to the +is highlighted.
How early to start rendering rows before they come on screen, in +pixels.
An array of child indices determining which children get docked to the
top of the screen when scrolling. For example, passing
stickyHeaderIndices={[0]} will cause the first child to be fixed to the
top of the scroll view. This property is not supported in conjunction
-with horizontal={true}.
Makes the sections headers sticky. The sticky behavior means that it
+with horizontal={true}.
Makes the sections headers sticky. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it is pushed off the screen by the next section header. This property is diff --git a/releases/next/docs/modal.html b/releases/next/docs/modal.html index da5eb6ee5a0..e6394caeadf 100644 --- a/releases/next/docs/modal.html +++ b/releases/next/docs/modal.html @@ -44,8 +44,8 @@ class ModalExample extends /View> ); } -}
DeprecatedUse the animationType prop instead.
The animationType prop controls how the modal animates.
slide slides in from the bottomfade fades into viewnone appears without an animationDefault is set to none.
The onShow prop allows passing a function that will be called once the modal has been shown.
The transparent prop determines whether your modal will fill the entire view. Setting this to true will render the modal over a transparent background.
The visible prop determines whether your modal is visible.
The hardwareAccelerated prop controls whether to force hardware acceleration for the underlying window.
The onRequestClose callback is called when the user taps the hardware back button.
The onOrientationChange callback is called when the orientation changes while the modal is being displayed.
-The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
The supportedOrientations prop allows the modal to be rotated to any of the specified orientations.
+}
DeprecatedUse the animationType prop instead.
The animationType prop controls how the modal animates.
slide slides in from the bottomfade fades into viewnone appears without an animationDefault is set to none.
The onShow prop allows passing a function that will be called once the modal has been shown.
The transparent prop determines whether your modal will fill the entire view. Setting this to true will render the modal over a transparent background.
The visible prop determines whether your modal is visible.
The hardwareAccelerated prop controls whether to force hardware acceleration for the underlying window.
The onRequestClose callback is called when the user taps the hardware back button.
The onOrientationChange callback is called when the orientation changes while the modal is being displayed.
+The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
The supportedOrientations prop allows the modal to be rotated to any of the specified orientations.
On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
UINavigationController, providing the same
animations and behavior from UIKIt.As the name implies, it is only available on iOS. Take a look at
-React Navigation for a cross-platform
+React Navigation for a cross-platform
solution in JavaScript, or check out either of these components for native
solutions: native-navigation,
react-native-navigation.
To set up the navigator, provide the initialRoute prop with a route
@@ -130,18 +130,144 @@ passed to the NavigatorIOS component.
In the example above the navigation bar color is changed when the new route -is pushed.
The default background color of the navigation bar.
NavigatorIOS uses route objects to identify child views, their props,
+is pushed.
The default background color of the navigation bar.
NavigatorIOS uses route objects to identify child views, their props,
and navigation bar configuration. Navigation operations such as push
-operations expect routes to look like this the initialRoute.
Boolean value that indicates whether the interactive pop gesture is
+operations expect routes to look like this the initialRoute.
Boolean value that indicates whether the interactive pop gesture is enabled. This is useful for enabling/disabling the back swipe navigation gesture.
If this prop is not provided, the default behavior is for the back swipe
gesture to be enabled when the navigation bar is shown and disabled when
the navigation bar is hidden. Once you've provided the
interactivePopGestureEnabled prop, you can never restore the default
behavior.
The default wrapper style for components in the navigator.
-A common use case is to set the backgroundColor for every scene.
Boolean value that indicates whether the navigation bar is hidden -by default.
Boolean value that indicates whether to hide the 1px hairline shadow -by default.
The default color used for the buttons in the navigation bar.
The default text color of the navigation bar title.
Boolean value that indicates whether the navigation bar is
+A common use case is to set the backgroundColor for every scene.
Boolean value that indicates whether the navigation bar is hidden +by default.
Boolean value that indicates whether to hide the 1px hairline shadow +by default.
The default color used for the buttons in the navigation bar.
The default text color of the navigation bar title.
Boolean value that indicates whether the navigation bar is translucent by default
Navigate forward to a new route.
| Name and Type | Description |
|---|---|
| route object | The new route to navigate to. |
Go back N scenes at once. When N=1, behavior matches pop().
| Name and Type | Description |
|---|---|
| n number | The number of scenes to pop. |
Pop back to the previous scene.
Replace a route in the navigation stack.
| Name and Type | Description |
|---|---|
| route object | The new route that will replace the specified one. |
| index number | The route into the stack that should be replaced. If it is negative, it counts from the back of the stack. |
Replace the route for the current scene and immediately load the view for the new route.
| Name and Type | Description |
|---|---|
| route object | The new route to navigate to. |
Replace the route/view for the previous scene.
| Name and Type | Description |
|---|---|
| route object | The new route to will replace the previous scene. |
Go back to the topmost item in the navigation stack.
Go back to the item for a particular route object.
| Name and Type | Description |
|---|---|
| route object | The new route to navigate to. |
Replaces the previous route/view and transitions back to it.
| Name and Type | Description |
|---|---|
| route object | The new route that replaces the previous scene. |
Replaces the top item and pop to it.
| Name and Type | Description |
|---|---|
| route object | The new route that will replace the topmost item. |
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Your app can now display all sorts of data and you may soon need to organize this content into several screens. To manage the transition between these screens, you will need to learn about navigators.
You can edit the content above on GitHub and send us a pull request!
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Example:
/> ); },If the progress bar will show indeterminate progress. Note that this -can only be false if styleAttr is Horizontal.
The progress value (between 0 and 1).
Style of the ProgressBar. One of:
Used to locate this view in end-to-end tests.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
The progress value (between 0 and 1).
Style of the ProgressBar. One of:
Used to locate this view in end-to-end tests.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Use ProgressViewIOS to render a UIProgressView on iOS.
The progress value (between 0 and 1).
A stretchable image to display as the progress bar.
The tint color of the progress bar itself.
The progress bar style.
A stretchable image to display behind the progress bar.
The tint color of the progress bar track.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Use ProgressViewIOS to render a UIProgressView on iOS.
The progress value (between 0 and 1).
A stretchable image to display as the progress bar.
The tint color of the progress bar itself.
The progress bar style.
A stretchable image to display behind the progress bar.
The tint color of the progress bar track.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
onRefresh event.Note: refreshing is a controlled prop, this is why it needs to be set to true
-in the onRefresh function otherwise the refresh indicator will stop immediately.
Called when the view starts refreshing.
Whether the view should be indicating an active refresh.
Whether the pull to refresh functionality is enabled.
Progress view top offset
Size of the refresh indicator, see RefreshControl.SIZE.
The title displayed under the refresh indicator.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
onRefresh function otherwise the refresh indicator will stop immediately.Called when the view starts refreshing.
Whether the view should be indicating an active refresh.
The colors (at least one) that will be used to draw the refresh indicator.
Whether the pull to refresh functionality is enabled.
Progress view top offset
Size of the refresh indicator, see RefreshControl.SIZE.
The title displayed under the refresh indicator.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
return ( contentContainer: { paddingVertical: 20 } - });
When true, the scroll view's children are arranged horizontally in a row -instead of vertically in a column. The default value is false.
Determines whether the keyboard gets dismissed in response to a drag. + });
When true, the scroll view's children are arranged horizontally in a row +instead of vertically in a column. The default value is false.
Determines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'on-drag', the keyboard is dismissed when a drag begins. - 'interactive', the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal. - On android this is not supported and it will have the same behavior as 'none'.
Determines when the keyboard should stay visible after a tap.
Determines when the keyboard should stay visible after a tap.
Called when scrollable content view of the ScrollView changes.
Handler function is passed the content width and content height as parameters: +a children, (or captured by an ancestor).
Called when scrollable content view of the ScrollView changes.
Handler function is passed the content width and content height as parameters:
(contentWidth, contentHeight)
It's implemented using onLayout handler attached to the content container -which this ScrollView renders.
Fires at most once per frame during scrolling. The frequency of the
-events can be controlled using the scrollEventThrottle prop.
When true, the scroll view stops on multiples of the scroll view's size +which this ScrollView renders.
Fires at most once per frame during scrolling. The frequency of the
+events can be controlled using the scrollEventThrottle prop.
When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default -value is false.
A RefreshControl component, used to provide pull-to-refresh +value is false.
A RefreshControl component, used to provide pull-to-refresh
functionality for the ScrollView. Only works for vertical ScrollViews
-(horizontal prop must be false).
See RefreshControl.
Experimental: When true, offscreen child views (whose overflow value is
+(horizontal prop must be false).
See RefreshControl.
Experimental: When true, offscreen child views (whose overflow value is
hidden) are removed from their native backing superview when offscreen.
This can improve scrolling performance on long lists. The default value is
-true.
When false, the content does not scroll. -The default value is true.
When true, shows a horizontal scroll indicator. -The default value is true.
When true, shows a vertical scroll indicator. -The default value is true.
An array of child indices determining which children get docked to the +true.
When false, the content does not scroll. +The default value is true.
When true, shows a horizontal scroll indicator. +The default value is true.
When true, shows a vertical scroll indicator. +The default value is true.
An array of child indices determining which children get docked to the
top of the screen when scrolling. For example, passing
stickyHeaderIndices={[0]} will cause the first child to be fixed to the
top of the scroll view. This property is not supported in conjunction
@@ -57,38 +61,49 @@ This adds a drop shadow to the item and affects z-order for overlapping views.
Only supported on Android 5.0+, has no effect on earlier versions.
Sometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization -that is not needed in the general case.
Used to override default value of overScroll mode.
Possible values:
'auto' - Default value, allow a user to over-scroll
-this view only if the content is large enough to meaningfully scroll.'always' - Always allow a user to over-scroll this view.'never' - Never allow a user to over-scroll this view.Tag used to log scroll performance on this scroll view. Will force +that is not needed in the general case.
Used to override default value of overScroll mode.
Possible values:
'auto' - Default value, allow a user to over-scroll
+this view only if the content is large enough to meaningfully scroll.'always' - Always allow a user to over-scroll this view.'never' - Never allow a user to over-scroll this view.Tag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native -FpsListener for it to be useful.
When true, the scroll view bounces horizontally when it reaches the end +FpsListener for it to be useful.
When true, the scroll view bounces horizontally when it reaches the end
even if the content is smaller than the scroll view itself. The default
-value is true when horizontal={true} and false otherwise.
When true, the scroll view bounces vertically when it reaches the end
+value is true when horizontal={true} and false otherwise.
When true, the scroll view bounces vertically when it reaches the end
even if the content is smaller than the scroll view itself. The default
-value is false when horizontal={true} and true otherwise.
Controls whether iOS should automatically adjust the content inset
+value is false when horizontal={true} and true otherwise.
Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or -tab bar/ toolbar. The default value is true.
When true, the scroll view bounces when it reaches the end of the +tab bar/ toolbar. The default value is true.
When true, the scroll view bounces when it reaches the end of the
content if the content is larger then the scroll view along the axis of
the scroll direction. When false, it disables all bouncing even if
-the alwaysBounce* props are true. The default value is true.
When true, gestures can drive zoom past min/max and the zoom will animate
+the alwaysBounce* props are true. The default value is true.
When true, gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end, otherwise the zoom will not exceed -the limits.
When false, once tracking starts, won't try to drag if the touch moves. -The default value is true.
When true, the scroll view automatically centers the content when the +the limits.
When false, once tracking starts, won't try to drag if the touch moves. +The default value is true.
When true, the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view, this property has no effect. The default value is false.
The amount by which the scroll view content is inset from the edges
of the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
Used to manually set the starting scroll offset.
-The default value is {x: 0, y: 0}.
A floating-point number that determines how quickly the scroll view
+The default value is {x: 0, y: 0}.
A floating-point number that determines how quickly the scroll view
decelerates after the user lifts their finger. You may also use string
shortcuts "normal" and "fast" which match the underlying iOS settings
for UIScrollViewDecelerationRateNormal and
UIScrollViewDecelerationRateFast respectively.
- normal: 0.998 (the default)
- - fast: 0.99
When true, the ScrollView will try to lock to only vertical or horizontal -scrolling while dragging. The default value is false.
The style of the scroll indicators. + - fast: 0.99
When true, the ScrollView will try to lock to only vertical or horizontal +scrolling while dragging. The default value is false.
The style of the scroll indicators.
- default (the default), same as black.
- black, scroll indicator is black. This style is good against a light background.
- - white, scroll indicator is white. This style is good against a dark background.
The maximum allowed zoom scale. The default value is 1.0.
The minimum allowed zoom scale. The default value is 1.0.
Called when a scrolling animation ends.
This controls how often the scroll event will be fired while scrolling
+ - white, scroll indicator is white. This style is good against a dark background.
The maximum allowed zoom scale. The default value is 1.0.
The minimum allowed zoom scale. The default value is 1.0.
Called when a scrolling animation ends.
This controls how often the scroll event will be fired while scrolling (as a time interval in ms). A lower number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. @@ -98,15 +113,19 @@ scroll position tracking, set this value higher to limit the information being sent across the bridge. The default value is zero, which results in the scroll event being sent only once each time the view is scrolled.
The amount by which the scroll view indicators are inset from the edges
of the scroll view. This should normally be set to the same value as
-the contentInset. Defaults to {0, 0, 0, 0}.
When true, the scroll view scrolls to top when the status bar is tapped. -The default value is true.
When snapToInterval is set, snapToAlignment will define the relationship
+the contentInset. Defaults to {0, 0, 0, 0}.
When true, the scroll view scrolls to top when the status bar is tapped. +The default value is true.
When snapToInterval is set, snapToAlignment will define the relationship
of the snapping to the scroll view.
- start (the default) will align the snap at the left (horizontal) or top (vertical)
- center will align the snap in the center
- - end will align the snap at the right (horizontal) or bottom (vertical)
When set, causes the scroll view to stop at multiples of the value of
+ - end will align the snap at the right (horizontal) or bottom (vertical)
When set, causes the scroll view to stop at multiples of the value of
snapToInterval. This can be used for paginating through children
that have lengths smaller than the scroll view. Used in combination
-with snapToAlignment.
The current scale of the scroll view content. The default value is 1.0.
Scrolls to a given x, y offset, either immediately or with a smooth animation.
Example:
scrollTo({x: 0; y: 0; animated: true})
Note: The weird function signature is due to the fact that, for historical reasons,
+with snapToAlignment.
The current scale of the scroll view content. The default value is 1.0.
Scrolls to a given x, y offset, either immediately or with a smooth animation.
Example:
scrollTo({x: 0; y: 0; animated: true})
Note: The weird function signature is due to the fact that, for historical reasons, the function also accepts separate arguments as an alternative to the options object. This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
If this is a vertical ScrollView scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.
Use scrollToEnd({animated: true}) for smooth animated scrolling,
diff --git a/releases/next/docs/sectionlist.html b/releases/next/docs/sectionlist.html
index 930761d500a..a6ec6def919 100644
--- a/releases/next/docs/sectionlist.html
+++ b/releases/next/docs/sectionlist.html
@@ -25,10 +25,11 @@ changes. This includes the data prop and parent component state.
key prop on each item and uses that for the React key.
-Alternatively, you can provide a custom keyExtractor prop.NOTE: removeClippedSubviews might not be necessary and may cause bugs. If you see issues with
-content not rendering, e.g when using LayoutAnimation, try setting
-removeClippedSubviews={false}, and we may change the default in the future after more
-experimentation in production apps.
Rendered in between adjacent Items within each section.
Rendered at the very end of the list.
Rendered at the very beginning of the list.
Rendered in between each section.
A marker property for telling the list to re-render (since it implements PureComponent). If
+Alternatively, you can provide a custom keyExtractor prop.
Rendered in between each item, but not at the top or bottom. By default, highlighted and
+leadingItem props are provided. renderItem provides separators.highlight/unhighlight
+which will update the highlighted prop, but you can also add custom props with
+separators.updateProps.
Rendered at the very end of the list.
Rendered at the very beginning of the list.
Rendered in between each section. Also receives highlighted, leadingItem, and any custom
+props from separators.updateProps.
A marker property for telling the list to re-render (since it implements PureComponent). If
any of your renderItem, Header, Footer, etc. functions depend on anything outside of the
data prop, stick it here and treat it immutably.
How many items to render in the initial batch. This should be enough to fill the screen but not
much more. Note these items will never be unmounted as part of the windowed rendering in order
@@ -43,8 +44,21 @@ sure to also set the refreshing prop correctly.
Called when the viewability of rows changes, as defined by the
-viewabilityConfig prop.
Set this true while waiting for new data from a refresh.
Default renderer for every item in every section. Can be over-ridden on a per-section basis.
Rendered at the top of each section. These stick to the top of the ScrollView by default on
-iOS. See stickySectionHeadersEnabled.
Makes section headers stick to the top of the screen until the next one pushes it off. Only
+viewabilityConfig prop.
Set this true while waiting for new data from a refresh.
Note: may have bugs (missing content) in some circumstances - use at your own risk.
This may improve scroll performance for large lists.
Default renderer for every item in every section. Can be over-ridden on a per-section basis.
Rendered at the top of each section. These stick to the top of the ScrollView by default on
+iOS. See stickySectionHeadersEnabled.
The actual data to render, akin to the data prop in <FlatList>.
General shape:
Makes section headers stick to the top of the screen until the next one pushes it off. Only enabled by default on iOS because that is the platform standard there.
Scrolls to the item at the specified sectionIndex and itemIndex (within the section)
positioned in the viewable area such that viewPosition 0 places it at the top (and may be
covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. viewOffset is a
@@ -96,11 +110,9 @@ const renderSectionHeader = /View>
);
-const CustomSeparatorComponent = ({text}) => (
- <View>
- <SeparatorComponent />
+const CustomSeparatorComponent = ({text, highlighted}) => (
+ <View style={[styles.customSeparator, highlighted && {backgroundColor: 'rgb(217, 217, 217)'}]}>
<Text style={styles.separatorText}>{text}</Text>
- <SeparatorComponent />
</View>
);
@@ -161,11 +173,11 @@ class SectionListExample extends ={HeaderComponent}
ListFooterComponent={FooterComponent}
- SectionSeparatorComponent={() =>
- <CustomSeparatorComponent text="SECTION SEPARATOR" />
+ SectionSeparatorComponent={({highlighted}) =>
+ <CustomSeparatorComponent highlighted={highlighted} text="SECTION SEPARATOR" />
}
- ItemSeparatorComponent={() =>
- <CustomSeparatorComponent text="ITEM SEPARATOR" />
+ ItemSeparatorComponent={({highlighted}) =>
+ <CustomSeparatorComponent highlighted={highlighted} text="ITEM SEPARATOR" />
}
debug={this.state.debug}
enableVirtualization={this.state.virtualized}
@@ -178,22 +190,30 @@ class SectionListExample extends ={[
{renderItem: renderStackedItem, key: 's1', data: [
- {title: 'Item In Header Section', text: 'Section s1', key: '0'},
+ {title: 'Item In Header Section', text: 'Section s1', key: 'header item'},
]},
{key: 's2', data: [
- {noImage: true, title: '1st item', text: 'Section s2', key: '0'},
- {noImage: true, title: '2nd item', text: 'Section s2', key: '1'},
+ {noImage: true, title: '1st item', text: 'Section s2', key: 'noimage0'},
+ {noImage: true, title: '2nd item', text: 'Section s2', key: 'noimage1'},
]},
...filteredSectionData,
]}
+ style={styles.list}
viewabilityConfig={VIEWABILITY_CONFIG}
/>
</UIExplorerPage>
);
}
- _renderItemComponent = ({item}) => (
- <ItemComponent item={item} onPress={this._pressItem} />
+
+ _renderItemComponent = ({item, separators}) => (
+ <ItemComponent
+ item={item}
+ onPress={this._pressItem}
+ onHideUnderlay={separators.unhighlight}
+ onShowUnderlay={separators.highlight}
+ />
);
+
// This is called when items change viewability by scrolling into our out of
// the viewable area.
_onViewableItemsChanged = (info: {
@@ -212,17 +232,25 @@ class SectionListExample extends )));
}
};
- _pressItem = (index: number) => {
- pressItem(this, index);
+
+ _pressItem = (key: string) => {
+ !isNaN(key) && pressItem(this, key);
};
}
const styles = StyleSheet.create({
+ customSeparator: {
+ backgroundColor: 'rgb(200, 199, 204)',
+ },
header: {
backgroundColor: '#e9eaed',
},
headerText: {
padding: 4,
+ fontWeight: '600',
+ },
+ list: {
+ backgroundColor: 'white',
},
optionSection: {
flexDirection: 'row',
@@ -233,8 +261,7 @@ const styles = StyleSheet: {
color: 'gray',
alignSelf: 'center',
- padding: 4,
- fontSize: 9,
+ fontSize: 7,
},
});
diff --git a/releases/next/docs/segmentedcontrolios.html b/releases/next/docs/segmentedcontrolios.html
index 756c363d139..4f94df90472 100644
--- a/releases/next/docs/segmentedcontrolios.html
+++ b/releases/next/docs/segmentedcontrolios.html
@@ -7,11 +7,11 @@ selects a value and changes the index, as shown in the example below.
If false the user won't be able to interact with the control. -Default value is true.
If true, then selecting a segment won't persist visually.
-The onValueChange callback will still work as expected.
Callback that is called when the user taps a segment; -passes the event as an argument
Callback that is called when the user taps a segment; -passes the segment's value as an argument
The index in props.values of the segment to be (pre)selected.
Accent color of the control.
The labels for the control's segment buttons, in order.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
If false the user won't be able to interact with the control. +Default value is true.
If true, then selecting a segment won't persist visually.
+The onValueChange callback will still work as expected.
Callback that is called when the user taps a segment; +passes the event as an argument
Callback that is called when the user taps a segment; +passes the segment's value as an argument
The index in props.values of the segment to be (pre)selected.
Accent color of the control.
The labels for the control's segment buttons, in order.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
A component used to select a single value from a range of values.
If true the user won't be able to move the slider. +
A component used to select a single value from a range of values.
If true the user won't be able to move the slider. Default value is false.
The color used for the track to the right of the button. -Overrides the default blue gradient image on iOS.
Initial maximum value of the slider. Default value is 1.
The color used for the track to the left of the button. -Overrides the default blue gradient image on iOS.
Initial minimum value of the slider. Default value is 0.
Callback that is called when the user releases the slider, +Overrides the default blue gradient image on iOS.
Initial maximum value of the slider. Default value is 1.
The color used for the track to the left of the button. +Overrides the default blue gradient image on iOS.
Initial minimum value of the slider. Default value is 0.
Callback that is called when the user releases the slider, regardless if the value has changed. The current value is passed -as an argument to the callback handler.
Callback continuously called while the user is dragging the slider.
Step value of the slider. The value should be +as an argument to the callback handler.
Callback continuously called while the user is dragging the slider.
Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0.
Used to style and layout the Slider. See StyleSheet.js and
-ViewStylePropTypes.js for more info.
Used to locate this view in UI automation tests.
Initial value of the slider. The value should be between minimumValue
+ViewStylePropTypes.js for more info.
Used to locate this view in UI automation tests.
Initial value of the slider. The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. Default value is 0.
This is not a controlled component, you don't need to update the value during dragging.
Assigns a maximum track image. Only static images are supported. The
diff --git a/releases/next/docs/switch.html b/releases/next/docs/switch.html
index 61eccb06357..aeb2311bc9f 100644
--- a/releases/next/docs/switch.html
+++ b/releases/next/docs/switch.html
@@ -2,8 +2,8 @@
updates the value prop in order for the component to reflect user actions.
If the value prop is not updated, the component will continue to render
the supplied value prop instead of the expected result of any user actions.
@keyword checkbox -@keyword toggle
If true the user won't be able to toggle the switch. -Default value is false.
Invoked with the new value when the value changes.
Used to locate this view in end-to-end tests.
Border color on iOS and background color on Android when the switch is turned off.
The value of the switch. If true the switch will be turned on. +@keyword toggle
If true the user won't be able to toggle the switch. +Default value is false.
Invoked with the new value when the value changes.
Used to locate this view in end-to-end tests.
Border color on iOS and background color on Android when the switch is turned off.
The value of the switch. If true the switch will be turned on. Default value is false.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
Little red bubble that sits at the top right of the icon.
A custom icon for the tab. It is ignored when a system icon is defined.
Callback when this tab is being selected, you should change the state of your -component to set selected={true}.
If set to true it renders the image as original, -it defaults to being displayed as a template
It specifies whether the children are visible or not. If you see a +
Little red bubble that sits at the top right of the icon.
A custom icon for the tab. It is ignored when a system icon is defined.
Callback when this tab is being selected, you should change the state of your +component to set selected={true}.
If set to true it renders the image as original, +it defaults to being displayed as a template
It specifies whether the children are visible or not. If you see a blank content, you probably forgot to add a selected one.
A custom icon when the tab is selected. It is ignored when a system -icon is defined. If left empty, the icon will be tinted in blue.
React style object.
Items comes with a few predefined system icons. Note that if you are +icon is defined. If left empty, the icon will be tinted in blue.
React style object.
Items comes with a few predefined system icons. Note that if you are using them, the title and selectedIcon will be overridden with the -system ones.
Text that appears under the icon. It is ignored when a system icon -is defined.
(Apple TV only)* When set to true, this view will be focusable +system ones.
Text that appears under the icon. It is ignored when a system icon +is defined.
(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote.
You can edit the content above on GitHub and send us a pull request!
Do not use unless you have a very good reason. All the elements that respond to press should have a visual feedback when touched.
TouchableWithoutFeedback supports only one child. -If you wish to have several child components, wrap them in a View.
Delay in ms, from onPressIn, before onLongPress is called.
Delay in ms, from the start of the touch, before onPressIn is called.
Delay in ms, from the release of the touch, before onPressOut is called.
If true, disable all interactions for this component.
This defines how far your touch can start away from the button. This is +If you wish to have several child components, wrap them in a View.
Delay in ms, from onPressIn, before onLongPress is called.
Delay in ms, from the start of the touch, before onPressIn is called.
Delay in ms, from the release of the touch, before onPressOut is called.
If true, disable all interactions for this component.
This defines how far your touch can start away from the button. This is
added to pressRetentionOffset when moving off of the button.
NOTE
The touch area never extends past the parent view bounds and the Z-index
of sibling views always takes precedence if a touch hits two overlapping
-views.
Invoked on mount and layout changes with
{nativeEvent: {layout: {x, y, width, height}}}
Called when the touch is released, but not if cancelled (e.g. by a scroll -that steals the responder lock).
When the scroll view is disabled, this defines how far your touch may +views.
Invoked on mount and layout changes with
{nativeEvent: {layout: {x, y, width, height}}}
Called when the touch is released, but not if cancelled (e.g. by a scroll +that steals the responder lock).
When the scroll view is disabled, this defines how far your touch may
move off of the button, before deactivating the button. Once deactivated,
try moving it back and you'll see that the button is once again
reactivated! Move it back and forth several times while the scroll view
diff --git a/releases/next/docs/virtualizedlist.html b/releases/next/docs/virtualizedlist.html
index 4adc9f48de9..c53c5a38eb8 100644
--- a/releases/next/docs/virtualizedlist.html
+++ b/releases/next/docs/virtualizedlist.html
@@ -13,10 +13,7 @@ changes. This includes the data prop and parent component state.
key prop on each item and uses that for the React key.
-Alternatively, you can provide a custom keyExtractor prop.NOTE: removeClippedSubviews might not be necessary and may cause bugs. If you see issues with
-content not rendering, e.g when using LayoutAnimation, try setting
-removeClippedSubviews={false}, and we may change the default in the future after more
-experimentation in production apps.
The default accessor functions assume this is an Array<{key: string}> but you can override
+Alternatively, you can provide a custom keyExtractor prop.
The default accessor functions assume this is an Array<{key: string}> but you can override getItem, getItemCount, and keyExtractor to handle any type of index-based data.
debug will turn on extra logging and visual overlays to aid with debugging both usage and
implementation, but with a significant perf hit.
DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully
unmounts react instances that are outside of the render window. You should only need to disable
@@ -32,9 +29,15 @@ sure to also set the refreshing prop correctly.
Called when the viewability of rows changes, as defined by the
-viewabilityConfig prop.
Set this true while waiting for new data from a refresh.
A native optimization that removes clipped subviews (those outside the parent) from the view -hierarchy to offload work from the native rendering system. They are still kept around so no -memory is saved and state is preserved.
Render a custom scroll component, e.g. with a differently styled RefreshControl.
Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
+viewabilityConfig prop.
Set this true while waiting for new data from a refresh.
Note: may have bugs (missing content) in some circumstances - use at your own risk.
This may improve scroll performance for large lists.
Render a custom scroll component, e.g. with a differently styled RefreshControl.
Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
screen. Similar fill rate/responsiveness tradeoff as maxToRenderPerBatch.
Determines the maximum number of items rendered outside of the visible area, in units of
visible lengths. So if your list fills the screen, then windowSize={21} (the default) will
render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing
diff --git a/releases/next/docs/webview.html b/releases/next/docs/webview.html
index 5792c093ba6..b78b530d1d5 100644
--- a/releases/next/docs/webview.html
+++ b/releases/next/docs/webview.html
@@ -11,33 +11,78 @@ class MyWeb extends );
}
}
You can use this component to navigate back and forth in the web view's -history and configure various properties for the web content.
Controls whether to adjust the content inset for web views that are +history and configure various properties for the web content.
Controls whether to adjust the content inset for web views that are
placed behind a navigation bar, tab bar, or toolbar. The default value
is true.
The amount by which the web view content is inset from the edges of -the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
DeprecatedUse the source prop instead.
Function that accepts a string that will be passed to the WebView and -executed immediately as JavaScript.
Set this to provide JavaScript that will be injected into the web page -when the view loads.
Boolean that determines whether HTML5 audio and video requires the user
-to tap them before they start playing. The default value is true.
Function that is invoked when the WebView load fails.
Function that is invoked when the WebView has finished loading.
Function that is invoked when the WebView load succeeds or fails.
Function that is invoked when the WebView starts loading.
A function that is invoked when the webview calls window.postMessage.
+the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
DeprecatedUse the source prop instead.
Function that accepts a string that will be passed to the WebView and +executed immediately as JavaScript.
Set this to provide JavaScript that will be injected into the web page +when the view loads.
Boolean that determines whether HTML5 audio and video requires the user
+to tap them before they start playing. The default value is true.
Function that is invoked when the WebView load fails.
Function that is invoked when the WebView has finished loading.
Function that is invoked when the WebView load succeeds or fails.
Function that is invoked when the WebView starts loading.
A function that is invoked when the webview calls window.postMessage.
Setting this property will inject a postMessage global into your
webview, but will still call pre-existing values of postMessage.
window.postMessage accepts one argument, data, which will be
available on the event object, event.nativeEvent.data. data
-must be a string.
Function that is invoked when the WebView loading starts or ends.
Function that returns a view to show if there's an error.
Function that returns a loading indicator.
Boolean that controls whether the web content is scaled to fit +must be a string.
Function that is invoked when the WebView loading starts or ends.
Function that returns a view to show if there's an error.
Function that returns a loading indicator.
Boolean that controls whether the web content is scaled to fit
the view and enables the user to change the scale. The default value
-is true.
Loads static html or a uri (with optional headers) in the WebView.
Boolean value that forces the WebView to show the loading view
-on the first load.
The style to apply to the WebView.
DeprecatedUse the source prop instead.
Boolean value to control whether DOM Storage is enabled. Used only in -Android.
Boolean value to enable JavaScript in the WebView. Used on Android only
-as JavaScript is enabled by default on iOS. The default value is true.
Specifies the mixed content mode. i.e WebView will allow a secure origin to load content from any other origin.
Possible values for mixedContentMode are:
'never' (default) - WebView will not allow a secure origin to load content from an insecure origin.'always' - WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.'compatibility' - WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.Sets the user-agent for the WebView.
Boolean that determines whether HTML5 videos play inline or use the
+is true.
Loads static html or a uri (with optional headers) in the WebView.
Boolean value that forces the WebView to show the loading view
+on the first load.
The style to apply to the WebView.
DeprecatedUse the source prop instead.
Boolean value to control whether DOM Storage is enabled. Used only in +Android.
Boolean value to enable JavaScript in the WebView. Used on Android only
+as JavaScript is enabled by default on iOS. The default value is true.
Specifies the mixed content mode. i.e WebView will allow a secure origin to load content from any other origin.
Possible values for mixedContentMode are:
'never' (default) - WebView will not allow a secure origin to load content from an insecure origin.'always' - WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.'compatibility' - WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.Sets the user-agent for the WebView.
Boolean that determines whether HTML5 videos play inline or use the
native full-screen controller. The default value is false.
NOTE : In order for video to play inline, not only does this
property need to be set to true, but the video element in the HTML
-document must also include the webkit-playsinline attribute.
Boolean value that determines whether the web view bounces
-when it reaches the edge of the content. The default value is true.
Determines the types of data converted to clickable URLs in the web view’s content.
+document must also include the webkit-playsinline attribute.
Boolean value that determines whether the web view bounces
+when it reaches the edge of the content. The default value is true.
Determines the types of data converted to clickable URLs in the web view’s content. By default only phone numbers are detected.
You can provide one type or an array of many types.
Possible values for dataDetectorTypes are:
'phoneNumber''link''address''calendarEvent''none''all'A floating-point number that determines how quickly the scroll view
decelerates after the user lifts their finger. You may also use the
string shortcuts "normal" and "fast" which match the underlying iOS
settings for UIScrollViewDecelerationRateNormal and
-UIScrollViewDecelerationRateFast respectively:
Function that allows custom handling of any web view requests. Return
+UIScrollViewDecelerationRateFast respectively:
Function that allows custom handling of any web view requests. Return
true from the function to continue loading the request and false
-to stop loading.
Boolean value that determines whether scrolling is enabled in the +to stop loading.
Boolean value that determines whether scrolling is enabled in the
WebView. The default value is true.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |