Skip to content

Drag and Auto Scroll Not Working with Sortable.flex and absolute Positioning in flexDirection: "row"#302

Description

@scrapecoder

I'm using Sortable.flex with flexDirection: "row", but I鈥檓 facing the following issues when the child components are positioned using position: "absolute":

Drag and Auto Scroll Not Working:
When the child is set to absolute position, the drag and auto scroll are not working as expected.

Incorrect Position Adjustment on Drag:
When I use the left value with absolute positioning, after a long press to start dragging, the view shifts further to the left, even though it's already positioned at the left value.

<Sortable.Flex
  flexDirection="row"
  height={VideoUtils.FRAME_WIDTH}
  gap={0}
  autoScrollEnabled
  autoScrollDirection="horizontal"
  width={'fill'}>
  {DATA.map((item, index) => (
    <View
      style={{
        position: 'absolute',
        left: index * 100, // Initial left position
        width: 100,
      }}
      key={item}>
      <Text>{item}</Text>
    </View>
  ))}
</Sortable.Flex>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions