react-native-draggable-grid icon indicating copy to clipboard operation
react-native-draggable-grid copied to clipboard

Not being able to drag inside the scrollView

Open Ruzen1 opened this issue 2 years ago • 4 comments

Hey @SHISME

Hey , How are you doing?

I am here to ask for a big help.

I am having a problem while dragging. The library works perfectly fine but when the items start increasing , the dragging stops working. I think its due to scroll view. When I pass [ contentContainerStyle={{flex: 1}} ] to the Scroll View, the dragging works fine, but the scrolling doesnt work anymore. When I remove it, the scrolling works but the dragging doesnt.

It would be really ver great help of you if you could give me some guidance, please.

Thank you

<ScrollView
           style={{
          minHeight: Dimensions.get("window").height * 0.85,
            backgroundColor: taknalColors.activeColor
}}>
                    <View
                      style={{
                        minHeight: Dimensions.get("window").height * 0.85,
                        backgroundColor: taknalColors.activeColor
                      }}>
                      <DraggableGrid
                        itemHeight={Dimensions.get("window").height * 0.24}
                        numColumns={3}
                        renderItem={this.render_item}
                       
                       // Rest of the important codes
                      />
                    </View>
 </ScrollView>

Ruzen1 avatar Jul 14 '21 10:07 Ruzen1

Maybe you should set the children's view height difference with ScrollView

SHISME avatar Jul 15 '21 09:07 SHISME

@SHISME Thank you for the reply. Can you please give me an example?

Ruzen1 avatar Jul 16 '21 05:07 Ruzen1

@SHISME Thank you for the reply. Can you please give me an example?

may like this


<ScrollView
           style={{
          minHeight: Dimensions.get("window").height * 0.85,
            backgroundColor: taknalColors.activeColor
}}>
                    <View>
                      <DraggableGrid
                        itemHeight={Dimensions.get("window").height * 0.24}
                        numColumns={3}
                        renderItem={this.render_item}
                       
                       // Rest of the important codes
                      />
                    </View>
 </ScrollView>

SHISME avatar Jul 18 '21 16:07 SHISME

The above code isn't working

arunvignesh-foodhub avatar Aug 16 '23 10:08 arunvignesh-foodhub