You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the issue is the value is not actually updated until the dialog is closed, so the value being used is always the previous one.
I'm not sure if there's something I'm doing wrong or maybe this tool is meant for simpler dialogs where it's only a description and an confirm/cancel button.
Thanks for your time.
The text was updated successfully, but these errors were encountered:
Sorry for the late reply, I missed this. If that's still relevant, you're adding the then callback immediately, so the current value is captured by the () => APICall(value) closure. You could probably work around this by using useRef() and always referring to the latest value in then :)
I have a confirmation dialog where I need the user to input an optional text value before confirming. My use of
confirm
looks something like this:And the issue is the value is not actually updated until the dialog is closed, so the value being used is always the previous one.
I'm not sure if there's something I'm doing wrong or maybe this tool is meant for simpler dialogs where it's only a description and an confirm/cancel button.
Thanks for your time.
The text was updated successfully, but these errors were encountered: