ollija / react-native-sortable-grid

Drag-drop-sortable grid view for react native
MIT License
439 stars 171 forks source link

Drag and Drop fails and the Grid collapses. #49

Open fabianunger opened 6 years ago

fabianunger commented 6 years ago

RN -> 0.52.0 React -> 16.2.0 I use react-native-navigation, maybe that causes the problem?

Hi @ollija, I tried a long time solving this. Grid displays fine, but drag and drop fails.

Is this a known Issue? Does anybody have similar problems?

Even the simplest example does not work:

 <SortableGrid
                blockTransitionDuration      = { 400 }
                activeBlockCenteringDuration = { 200 }
                itemsPerRow                  = { 4 }
                dragActivationTreshold       = { 200 }
                onDragRelease                = { (itemOrder) => console.log("Drag was released, the blocks are in the following order: ", itemOrder) }
                onDragStart                  = { ()          => console.log("Some block is being dragged now!") }
            >
                {
                    this.state.abc.map( (letter, index) =>
                        <View key={index} style={styles.block}>
                            <Text style={{color: 'white', fontSize: 50}}>{letter}</Text>
                        </View>
                    )
                }

            </SortableGrid>

drag_and_drop_fails

ilyaivanov commented 5 years ago

I had the same issue. What's disturbing about this, is that in Debug mode this is actually working.

saulve commented 4 years ago

@ilyaivanov have you found a solution?

Yandamuri commented 4 years ago

Drag and drop is not working for me as well. Does anyone have similar issue?