Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FaltList scroll does not work #48220

Open
BKazimy opened this issue Dec 11, 2024 · 3 comments
Open

FaltList scroll does not work #48220

BKazimy opened this issue Dec 11, 2024 · 3 comments
Labels
Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Needs: Triage 🔍 Newer Patch Available

Comments

@BKazimy
Copy link

BKazimy commented Dec 11, 2024

Description

I used a FlatList and it does not work

This is my code snipet of implementing the FlatList

  return ( 
       <View style={{ flex: 1 }}>
           <FlatList 
               data={Entries} 
               keyExtractor={(item) => item.id} 
               renderItem={renderCategoryItem}
               numColumns={1}
               contentContainerStyle={{paddingBottom: 10}}
               style={styles.flatlist}
               scrollEnabled={true}
           />
       </View>
   );
}

export default AllQuote;

const styles = StyleSheet.create({
   flatlist: {
       flex: 1,
       marginVertical: 8,
   },
});

And this is the component Im using:

return (
        <View style={styles.gridItem}>
            <Pressable 
                android_ripple={{color: colors}}
                style={({ pressed }) => [
                    styles.button,
                    pressed ? styles.buttonPress : null,
                ]}  
                onPress={onPress}
            >
                <View style={styles.innerContainer}>
                    <Text style={styles.title}>{title}</Text>
                    {subtitle && <Text style={styles.authorText}> -{subtitle}</Text>}
                </View>
            </Pressable>
        </View>
    );
}

export default CompButton;

const styles = StyleSheet.create({
    gridItem: {
        flex: 1,
        margin: 16,
        marginVertical: 8,
        borderRadius: 8,
        elevation: 4,
        backgroundColor: 'white',
        shadowColor: 'black',
        shadowOpacity: 0.25,
        shadowOffset: { width: 0, height: 2},
        shadowRadius: 8,
        overflow: Platform.OS === 'android' ? 'hidden' : 'visible',
    },

    button: {
        flex: 1,
        shadowColor: 'black',
        shadowOpacity: 0.25,
        shadowOffset: { width: 0, height: 2},
        shadowRadius: 8,
        overflow: Platform.OS === 'android' ? 'hidden' : 'visible',
    },

    buttonPress: {
        opacity: .75,
    },

    innerContainer: {
        flex: 1,
        padding: 16,
        borderRadius: 8,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: colors.darkOliveGreen,
    },

    title: {
        fontWeight: 'bold',
        fontSize: 18,
        color: colors.khaki,
    },

    authorText: {
        fontSize: 20,
        color: colors.darkKhaki,
        fontStyle: 'italic',
    },
})

Expected behavior

It shoul scroll without any problem, but it does not.
it stayes as if its a static element.

Steps to reproduce

this is the link to the repository

BTW im using web for development since I cant use my phone for network AND testing device.

React Native Version

0.76.3

Output of npx react-native info

⚠️ react-native depends on @react-native-community/cli for cli commands. To fix update your package.json to include:


  "devDependencies": {
    "@react-native-community/cli": "latest",
  }

Screenshots and Videos

No response

@BKazimy BKazimy added Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Needs: Triage 🔍 labels Dec 11, 2024
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@ralph1233
Copy link

I tested it on Android, and it is scrolling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Needs: Triage 🔍 Newer Patch Available
Projects
None yet
Development

No branches or pull requests

3 participants