Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
BugFix: ReorderModal
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishwa-Raghavendra committed May 12, 2022
1 parent 7aee929 commit f5a5979
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ fun <T : Reorderable> BoxScope.ReorderModal(
ItemContent: @Composable RowScope.(Int, Any) -> Unit
) {
var items by remember(id, initialItems) { mutableStateOf(initialItems) }
var reOrderedList by remember {
mutableStateOf(emptyList<Any>())
var reOrderedList :List<Any>? by remember {
mutableStateOf(null)
}
var orderNumUpdates by remember {
mutableStateOf(
Expand All @@ -126,7 +126,7 @@ fun <T : Reorderable> BoxScope.ReorderModal(
onUpdateItemOrderNum(items, item, newOrderNum)
}

onReordered?.invoke(reOrderedList)
onReordered?.invoke(reOrderedList ?: items)
dismiss()
}
}
Expand Down

0 comments on commit f5a5979

Please sign in to comment.