surveysparrow / twigs

Themeable, Customisable and Fully Accessible React Component Library from SurveySparrow
https://twigs.surveysparrow.com/
MIT License
17 stars 8 forks source link

Dialogs Manager for Open and Alert variant need a control over modal close #89

Open shettyMegh9 opened 2 weeks ago

shettyMegh9 commented 2 weeks ago

Describe the bug When we are using dialogs.open, assume that confirmButtonProps onClick is a async func. Dialogs should not close until API call is done but currently its closing dialog onClick itself.

To Reproduce Steps to reproduce the behaviour:

  1. Use dialogs function open variant or alert variant
  2. Pass Async function to confirmButtonProps onClick
  3. Click confirm btn, it will close immediately

Expected behaviour Dialog should close only after API call is done