How would I go about displaying a confirmation modal screen when a button is pressed. My goal is to have the user confirm the action that will happen based on the button they pressed. If they select to continue the action would happen (i.e. API call to update a record in my database). If they select to cancel the action then the modal would go away and they would be back on the originating screen with no action having happened.
My specific example has an action button on each row of a list of people in a list. When that row’s button is pressed, the confirmation modal should be shown to confirm the action they are taking.
A direction on how to approach this would be greatly appreciated. Thanks!