Roberto Yorio
Roberto Yorio

Reputation: 89

How can I make a Flatlist not scrollable in ReactNative

I would like to know can I make a flatlist not scrollable for a moment. For example: there is a boolean constant that whenever is true, you can scroll the flatlist but whenever is false, how can I make it so that it can not be scrolled?

Upvotes: 0

Views: 304

Answers (1)

ShevO27
ShevO27

Reputation: 906

The FlatList inherits props of ScrollView according to docs, so it should have scrollEnabled prop ScrollView props
and try setting it up as:

scrollEnabled={ false }

in your FlatList props.

Upvotes: 1

Related Questions