BREAKING CHANGES
ReorderableItem now required in ReorderableColumn and ReorderableRow
needed this to solve #94
ReorderableColumn(
list = list,
onSettle = { fromIndex, toIndex ->
// Update the list
},
) { index, item, isDragging ->
key(item.id) {
// !!! NEW !!!
ReorderableItem {
// Item content
IconButton(modifier = Modifier.draggableHandle(), /* ... */)
}
}
}New default auto scroll item move behavior in grids
onMove is now called with the item below the dragging item instead of the last visible item when auto scrolling.
To revert to the old behavior, pass scrollMoveMode = ScrollMoveMode.INSERT to rememberReorderableLazy*GridState
For onMove to work as the video below,
change
list = list.toMutableList().apply {
add(to.index, removeAt(from.index))
}to
list = list.toMutableList().apply {
this[to.index] = this[from.index].also {
this[from.index] = this[to.index]
}
}| NEW | old |
|---|---|
|
|

