From 602b5d55de996b18e63529f9179944caa498a853 Mon Sep 17 00:00:00 2001 From: biaji <2725285+biaji@users.noreply.github.com> Date: Mon, 22 May 2023 15:54:42 +0800 Subject: [PATCH] Fix #8 --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index f0a4837..e74dbc1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,10 +16,10 @@ class ScrollableTabView extends React.Component { static getDerivedStateFromProps(props, state) { if ( - props.index !== state.currentPage + props.page !== state.currentPage ) { return { - currentPage: props.index, + currentPage: props.page, }; } return null;