trainListをスクロールして閉じようとしたらトップにスクロールを移動させるように変更
This commit is contained in:
parent
a2b37f4f35
commit
9b1fee75c7
@ -413,6 +413,7 @@ export const EachTrainInfoCore = ({
|
|||||||
tailStation={tailStation}
|
tailStation={tailStation}
|
||||||
navigate={navigate}
|
navigate={navigate}
|
||||||
from={from}
|
from={from}
|
||||||
|
scrollHandlers={scrollHandlers}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DynamicHeaderScrollView
|
<DynamicHeaderScrollView
|
||||||
|
@ -20,6 +20,7 @@ type Props = {
|
|||||||
navigate: any;
|
navigate: any;
|
||||||
from: string;
|
from: string;
|
||||||
fontLoaded: boolean;
|
fontLoaded: boolean;
|
||||||
|
scrollHandlers: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
const textConfig: TextStyle = {
|
const textConfig: TextStyle = {
|
||||||
@ -37,6 +38,7 @@ export const HeaderText: FC<Props> = ({
|
|||||||
tailStation,
|
tailStation,
|
||||||
navigate,
|
navigate,
|
||||||
from,
|
from,
|
||||||
|
scrollHandlers
|
||||||
}) => {
|
}) => {
|
||||||
const { limited, trainNum } = data;
|
const { limited, trainNum } = data;
|
||||||
|
|
||||||
@ -116,7 +118,7 @@ export const HeaderText: FC<Props> = ({
|
|||||||
}, [trainData]);
|
}, [trainData]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ padding: 10, flexDirection: "row", alignItems: "center" }}>
|
<View style={{ padding: 10, flexDirection: "row", alignItems: "center" }} onTouchStart={()=>scrollHandlers.ref.current?.scrollTo({ y: 0, animated: true })}>
|
||||||
<TrainIconStatus {...{ data, navigate, from }} />
|
<TrainIconStatus {...{ data, navigate, from }} />
|
||||||
<View
|
<View
|
||||||
style={{ borderRadius: 5, flexDirection: "row", alignItems: "center" }}
|
style={{ borderRadius: 5, flexDirection: "row", alignItems: "center" }}
|
||||||
|
Loading…
Reference in New Issue
Block a user