deanmcpherson / react-native-sortable-listview

Drag drop capable wrapper of ListView for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for horizontal list?

allanjsx opened this issue · comments

I have a horizontal list to sort, after adding horizontal={true} to the sortable list, I observed the sorting behavior is weird, and I still have to drag the item up and down.

Here's example:

<SortableListView
    style={{ flex: 1 }}
    data={this.props.images}
    order={order}
    onRowMoved={e => {
        order.splice(e.to, 0, order.splice(e.from, 1)[0])
        this.forceUpdate()
    }}
    horizontal={true}     <------ added this to make it horizontal.
    renderRow={row => <RowComponent data={row} />}
/>

Any suggested work around? Thanks.

Horizontal lists are not supported. Use react-native-sortable-list.