Skip to main content

How to get modal value when close the modal on web sdk2

  • August 12, 2022
  • 3 replies
  • 110 views

Forum|alt.badge.img+2

Hi everyone

I have to get the input value when click the OK button.

I used this code on sdk v1, but it seems like .then() doesn’t work on sdk v2

Please let me know your ideas.

Thank you

3 replies

Addison Schultz
Mironeer

Hey Maxim - I would attach some logic to the onClick handler of the button, so that when you click “OK”, you read the value of the input 


Forum|alt.badge.img+2
  • Author
  • Contributor
  • 10 replies
  • September 2, 2022

@Addison Schultz 

Yeah you are right. It is possible to get the input value on setTagNameModal.html

so I stored the value in the metadata and have to get this on main.html

.then() doesn’t work on web sdk 2.0 I think

please let me know your thought


Addison Schultz
Mironeer
  • Mironeer
  • 135 replies
  • October 17, 2022

You’re working with quite a lot of nested then/promises. Are you able to work with async/await instead? 

Otherwise, you will need to include the async keyword in the first “then” call (the one right after you declare width/height (in the first line of the original screenshot you posted)