Skip to content

Using a confirm dialog after invoking a rust function #4757

Answered by abisar
tataDan asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like you're not waiting for invoke to respond. Try this:

async function do_order() {
  ...
  let order = await invoke("order", {
    name, // You don't need to specify key if it's the same as value
    phone: phone,
    address: address,
    options: options,
  });
  let confirmed = await confirm(order, "Order Confirmation");
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tataDan
Comment options

Answer selected by FabianLars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants