computerjazz / react-native-draggable-flatlist

A drag-and-drop-enabled FlatList for React Native
MIT License
1.94k stars 406 forks source link

Item being dragged is invisible #89

Closed acoutts closed 4 years ago

acoutts commented 5 years ago

While dragging an item, it turns invisible as soon as I long press it.

Here is my row renderer:

const RowItem = inject("stores")(
  observer(
    ({
      move,
      moveEnd,
      item,
      currentWallet,
      isEditingWalletSorting,
      isActive,
    }: {
      item: IWallet
      currentWallet: string
      isEditingWalletSorting: boolean
      move: () => void
      moveEnd: () => void
      isActive: boolean
    }) => {
      return (
        <RowContainer>
          <View style={{flexDirection: "row", alignItems: "center"}}>
            <Circle color={item.color}>
              <WalletIconSvg width={1 * rem} height={1 * rem} fillOpacity={1} />
            </Circle>

            <View style={{marginLeft: 0.041 * screenWidth}}>
              <WalletTitle>{item.name}</WalletTitle>
              <WalletBalance>{CommaNumber(item.balance)} sat</WalletBalance>
            </View>
          </View>

          {isEditingWalletSorting ? (
            <TouchableHighlight onLongPress={move} onPressOut={() => moveEnd()} underlayColor={"transparent"}>
              <RearrangeSvg width={0.5 * rem} fillOpacity={1} fill={brandColorGrayText} />
            </TouchableHighlight>
          ) : (
            item.name === currentWallet && <CheckmarkSvg width={1.5 * rem} height={1.5 * rem} fillOpacity={1} fill={`rgb(${item.color})`} />
          )}
        </RowContainer>
      )
    },
  ),
)
jimsideout commented 5 years ago

Any chance you solved this?

sslash commented 4 years ago

Same issue here

computerjazz commented 4 years ago

Likely fixed in v2, please reopen if not

jimsideout commented 4 years ago

Likely fixed in v2, please reopen if not

Seemed my issue stemmed from using the flatlist inside of a Modal. Presenting full screen worked.