Select new transfer on creation

This commit is contained in:
Emilia Allison 2023-06-01 13:51:25 -04:00
parent d5d26facde
commit ecb3dc2945
Signed by: emilia
GPG Key ID: 7A3F8997BFE894E0
1 changed files with 6 additions and 1 deletions

View File

@ -176,7 +176,12 @@ pub fn TransferMenu() -> Html {
ct_state.transfer.transfer_region, ct_state.transfer.transfer_region,
ct_state.transfer.name.clone() ct_state.transfer.name.clone()
); );
main_dispatch.reduce_mut(|state| state.transfers.push(new_transfer)); main_dispatch.reduce_mut(|state| {
state.transfers.push(new_transfer);
state.selected_transfer = state.transfers.last()
.expect("An element should have just been added")
.get_uuid();
});
} }
} }
} else { } else {