From a079d409d99ccd2c1b4855e5140557e02a7dc4f4 Mon Sep 17 00:00:00 2001 From: KrrI Date: Fri, 13 Jun 2025 11:02:06 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#ICEXGC]:=20react-native-swi?= =?UTF-8?q?pe-list-view=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KrrI --- en/react-native-swipe-list-view.md | 29 ++++++++++++++++++++++++++ zh-cn/react-native-swipe-list-view.md | 30 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/en/react-native-swipe-list-view.md b/en/react-native-swipe-list-view.md index 8384a3a1..62833ef8 100644 --- a/en/react-native-swipe-list-view.md +++ b/en/react-native-swipe-list-view.md @@ -246,6 +246,35 @@ Check the release version information in the release address of the third-party | swipeToOpenPercent | What % of the left/right openValue does the user need to swipe past to trigger the row opening. | number | NO | Android iOS | YES | | swipeToClosePercent | What % of the left/right openValue does the user need to swipe past to trigger the row closing. | number | NO | Android iOS | YES | | swipeToOpenVelocityContribution | Describes how much the ending velocity of the gesture affects whether the swipe will result in the item being closed or open. A velocity factor of 0 (the default) means that the velocity will have no bearing on whether the swipe settles on a closed or open position and it'll just take into consideration the swipeToOpenPercent. Ideal values for this prop tend to be between 5 and 15. | number | NO | Android iOS | YES | +| recalculateHiddenLayout | Enable hidden row onLayout calculations to run always. By default, hidden row size calculations are only done on the first onLayout event for performance reasons. Passing true here will cause calculations to run on every onLayout event. You may want to do this if your rows' sizes can change. One case is a SwipeListView with rows of different heights and an options to delete rows. | bool | NO | Android iOS | YES | +| swipeGestureBegan | Called when a swipe row is animating swipe | func | NO | Android iOS | YES | +| swipeGestureEnded | Called when user has ended their swipe gesture | func | NO | Android iOS | YES | +| onRowOpen | Called when a swipe row is animating open. This has a param of toValue which is the new X value the row (after it has opened). This can be used to calculate which direction the row has been swiped open. | func | NO | Android iOS | YES | +| onRowDidOpen | Called when a swipe row has animated open | func | NO | Android iOS | YES | +| onRowClose | Called when a swipe row is animating closed | func | NO | Android iOS | YES | +| onRowDidClose | Called when a swipe row has animated closed | func | NO | Android iOS | YES | +| onLeftActionStatusChange | Called once when swipe value crosses the leftActivationValue | func | NO | Android iOS | YES | +| onRightActionStatusChange | Called once when swipe value crosses the rightActivationValue | func | NO | Android iOS | YES | +| onLeftAction | Called when row shifted to leftActivationValue | func | NO | Android iOS | YES | +| onRightAction | Called when row shifted to rightActivationValue | func | NO | Android iOS | YES | +| onScrollEnabled | Called when scrolling has been enabled/disabled | func | NO | Android iOS | YES | +| swipeRowStyle | Styles for the parent wrapper View of the SwipeRow | object | NO | Android iOS | YES | +| listViewRef | Called when the ListView ref is set and passes a ref to the ListView. e.g. listViewRef={ ref => this._swipeListViewRef = ref } | func | NO | Android iOS | YES | +| previewRowKey | Should the row with this key do a slide out preview to show that the list is swipeable | string | NO | Android iOS | YES | +| previewDuration | Duration of the slide out preview animation | number | NO | Android iOS | YES | +| previewRepeat | Should the animation repeat | bool | NO | Android iOS | YES | +| previewRepeatDelay | Delay between each preview repeat in milliseconds | number | NO | Android iOS | YES | +| previewOpenValue | TranslateX value for the slide out preview animation. | number | NO | Android iOS | YES | +| previewOpenDelay | Add some delay before opening the preview row. Can be useful when you have enter animation. | number | NO | Android iOS | YES | +| friction | Friction for the open / close animation. Controls "bounciness"/overshoot. | number | NO | Android iOS | YES | +| tension | Tension for the open / close animation. Controls speed | number | NO | Android iOS | YES | +| restSpeedThreshold | RestSpeedThreshold for the open / close animation. Controls speed. | number | NO | Android iOS | YES | +| restDisplacementThreshold | RestDisplacementThreshold for the open / close animation. Controls speed. | number | NO | Android iOS | YES | +| onSwipeValueChange | Callback invoked any time the translateX value of a row changes | func | NO | Android iOS | YES | +| renderListView | To render a custom ListView component, if you don't want to use ReactNative one. Note: This will call renderRow, not renderItem | func | NO | Android iOS | YES | +| shouldItemUpdate | Callback to determine whether component should update | func | NO | Android iOS | YES | +| useNativeDriver | useNativeDriver: true for all animations | bool | NO | Android iOS | YES | +| onPreviewEnd | Callback that runs after row swipe preview is finished | func | NO | Android iOS | YES | **SwipeRow** diff --git a/zh-cn/react-native-swipe-list-view.md b/zh-cn/react-native-swipe-list-view.md index f0ccbbfb..a65331a0 100644 --- a/zh-cn/react-native-swipe-list-view.md +++ b/zh-cn/react-native-swipe-list-view.md @@ -244,6 +244,36 @@ const styles = StyleSheet.create({ | swipeToOpenPercent | What % of the left/right openValue does the user need to swipe past to trigger the row opening. | number | NO | Android iOS | YES | | swipeToClosePercent | What % of the left/right openValue does the user need to swipe past to trigger the row closing. | number | NO | Android iOS | YES | | swipeToOpenVelocityContribution | Describes how much the ending velocity of the gesture affects whether the swipe will result in the item being closed or open. A velocity factor of 0 (the default) means that the velocity will have no bearing on whether the swipe settles on a closed or open position and it'll just take into consideration the swipeToOpenPercent. Ideal values for this prop tend to be between 5 and 15. | number | NO | Android iOS | YES | +| recalculateHiddenLayout | Enable hidden row onLayout calculations to run always. By default, hidden row size calculations are only done on the first onLayout event for performance reasons. Passing true here will cause calculations to run on every onLayout event. You may want to do this if your rows' sizes can change. One case is a SwipeListView with rows of different heights and an options to delete rows. | bool | NO | Android iOS | YES | +| swipeGestureBegan | Called when a swipe row is animating swipe | func | NO | Android iOS | YES | +| swipeGestureEnded | Called when user has ended their swipe gesture | func | NO | Android iOS | YES | +| onRowOpen | Called when a swipe row is animating open. This has a param of toValue which is the new X value the row (after it has opened). This can be used to calculate which direction the row has been swiped open. | func | NO | Android iOS | YES | +| onRowDidOpen | Called when a swipe row has animated open | func | NO | Android iOS | YES | +| onRowClose | Called when a swipe row is animating closed | func | NO | Android iOS | YES | +| onRowDidClose | Called when a swipe row has animated closed | func | NO | Android iOS | YES | +| onLeftActionStatusChange | Called once when swipe value crosses the leftActivationValue | func | NO | Android iOS | YES | +| onRightActionStatusChange | Called once when swipe value crosses the rightActivationValue | func | NO | Android iOS | YES | +| onLeftAction | Called when row shifted to leftActivationValue | func | NO | Android iOS | YES | +| onRightAction | Called when row shifted to rightActivationValue | func | NO | Android iOS | YES | +| onScrollEnabled | Called when scrolling has been enabled/disabled | func | NO | Android iOS | YES | +| swipeRowStyle | Styles for the parent wrapper View of the SwipeRow | object | NO | Android iOS | YES | +| listViewRef | Called when the ListView ref is set and passes a ref to the ListView. e.g. listViewRef={ ref => this._swipeListViewRef = ref } | func | NO | Android iOS | YES | +| previewRowKey | Should the row with this key do a slide out preview to show that the list is swipeable | string | NO | Android iOS | YES | +| previewDuration | Duration of the slide out preview animation | number | NO | Android iOS | YES | +| previewRepeat | Should the animation repeat | bool | NO | Android iOS | YES | +| previewRepeatDelay | Delay between each preview repeat in milliseconds | number | NO | Android iOS | YES | +| previewOpenValue | TranslateX value for the slide out preview animation. | number | NO | Android iOS | YES | +| previewOpenDelay | Add some delay before opening the preview row. Can be useful when you have enter animation. | number | NO | Android iOS | YES | +| friction | Friction for the open / close animation. Controls "bounciness"/overshoot. | number | NO | Android iOS | YES | +| tension | Tension for the open / close animation. Controls speed | number | NO | Android iOS | YES | +| restSpeedThreshold | RestSpeedThreshold for the open / close animation. Controls speed. | number | NO | Android iOS | YES | +| restDisplacementThreshold | RestDisplacementThreshold for the open / close animation. Controls speed. | number | NO | Android iOS | YES | +| onSwipeValueChange | Callback invoked any time the translateX value of a row changes | func | NO | Android iOS | YES | +| renderListView | To render a custom ListView component, if you don't want to use ReactNative one. Note: This will call renderRow, not renderItem | func | NO | Android iOS | YES | +| shouldItemUpdate | Callback to determine whether component should update | func | NO | Android iOS | YES | +| useNativeDriver | useNativeDriver: true for all animations | bool | NO | Android iOS | YES | +| onPreviewEnd | Callback that runs after row swipe preview is finished | func | NO | Android iOS | YES | + **SwipeRow** -- Gitee