Bar Galili

Results 16 comments of Bar Galili

you should also account for the different sizes (small, medium, large) for small => margin: 22 for medium (default) => margin: 24 for large => margin: 36

@adirzoari As the docs states, you can pass order array as follows: componentDidMount() { setTimeout(() => { const order = [2, 1, 9, 7, 3, 0, 8, 4, 5, 6];...

@adirzoari You tried passing onPressRow function as prop to SortableList? From the docs: onPressRow? (function) (key) => void Called when a row was pressed.

Do the props in the row render function has onPress function?

> > Do the props in the row render function has onPress function? > > no.. how to pass it? Nevermind, my bad. The onPressRow should suffice

@adirzoari try this: <SortableList style={styles.list} contentContainerStyle={styles.contentContainer} data={this.state.data} renderRow={this._renderRow} order={this.state.order} sortingEnabled={true} manuallyActivateRows={true} onPressRow={(key) => { this.setState({order: [key, ...Object.keys(this.state.data).filter((i) => i != key)]}) }} /> * the ordering could use some more...

@adirzoari in my attempt to re-create it you cannot re-organize by dragging, only by clicking on a row will it move to the top https://snack.expo.io/rJIMsvQEN

@adirzoari Glad i could help :)

Add view with border? Or border on the Row component?