Skip to content

how to pass values to Alert Dialog onConfirm function #1547

Answered by richbachman
ycaoT asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ycaoT. Thanks for sharing the CodeSandbox. I've made some edits, and added a way to pass the input value. Basically I'm using state to store the value, and then retrieving the state of value in the the confirmation function.

https://codesandbox.io/s/loving-dust-0ghed?file=/src/App.js

Replies: 2 comments 2 replies

Comment options

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

Comment options

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

Answer selected by ycaoT
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