1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Mobile: Fixes #9259: Config screen: Fix section list scroll (#9267)

This commit is contained in:
Henry Heino 2023-11-11 09:09:34 -08:00 committed by GitHub
parent 39803f53a0
commit 692e925997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ import * as React from 'react';
import Setting, { AppType, SettingMetadataSection } from '@joplin/lib/models/Setting';
import { FunctionComponent, useEffect, useMemo, useState } from 'react';
import { ConfigScreenStyles } from './configScreenStyles';
import { FlatList, Text, Pressable, View } from 'react-native';
import { FlatList, Text, Pressable, View, ViewStyle } from 'react-native';
import { settingsSections } from '@joplin/lib/components/shared/config/config-shared';
import Icon from '../../Icon';
@ -82,8 +82,15 @@ const SectionSelector: FunctionComponent<Props> = props => {
}
}, [props.selectedSectionName, flatListRef, sections]);
const containerStyle: ViewStyle = useMemo(() => ({
width: props.width,
maxWidth: props.width,
minWidth: props.width,
flex: 1,
}), [props.width]);
return (
<View style={{ width: props.width, flexDirection: 'column' }}>
<View style={containerStyle}>
<FlatList
role='tablist'
ref={setFlatListRef}