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

want some inactive items not to be sorted, inactive property is not working

Open ghost opened this issue 6 years ago • 5 comments

want some inactive items not to be sorted, inactive property is not working as desired. For inactive child property, document doesn't explains much.

<View key={i} 
                    style={{height:90, width:90, borderRadius:45, borderColor:"#9b9b9b", borderWidth:3, alignItems:"center", justifyContent:"center"}} 
                     inactive ={true}
              >
                        <Entypo name="circle-with-plus" style={{color:"#9b9b9b"}} size={76} />
                </View>

ghost avatar Mar 05 '19 13:03 ghost

Did you able find any solution for this ?? I am facing the same issue.

pankajnegi-soar187 avatar Apr 10 '19 06:04 pankajnegi-soar187

I ended up making them inactive in form of selection. Though they are still moving if displaced by other active component.

ghost avatar Apr 10 '19 08:04 ghost

ok @ManMohanVyas thanks for your feedback.

pankajnegi-soar187 avatar Apr 10 '19 10:04 pankajnegi-soar187

I have forked this project. I have added unsortableItemsIndex parameter to SortableView as its prop. unsortableItemsIndex={[4, 5]} item with index 4 and 5 in sortablegrid won't be swapped with others.

Simply added index of item you don't want it to be sorted(swapped) into unsortableItemsIndex.

here is my fork link:https://github.com/BruceSuperProgramer/react-native-sortable-grid

BruceSuperProgramer avatar Jun 14 '19 10:06 BruceSuperProgramer

I forked and added a prop named fixed from this pr #42. I think this is what you need. https://github.com/alikazemkhanloo/rn-sortable-grid

alikazemkhanloo avatar Aug 10 '19 10:08 alikazemkhanloo