Greg Steckman
11/15/2020, 10:30 PMIgor Demin
11/16/2020, 11:30 AMfun ItemForm(item: Item, saveAction: (Item) -> Unit) = key(item) {
Because item
is changed we need to recreate all components that depends on it.
Without key
they will not be recreated (because they depends only on tempItem.name
which is not changed).
So onValueChange
will not be changed (and onValueChange
will modify the old captured tempItem
)Greg Steckman
11/16/2020, 3:59 PM