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
SwiftUI alerts currently lack support for showing loading states when performing asynchronous tasks, which makes it difficult to provide feedback during operations that take time to complete. See attachment for what my ideal outcome looks like.
Current Behavior:
When using SwiftUI alerts with buttons that trigger async operations (like saving data or making network requests), there's no great way to:
Show a loading indicator on the action button
Disable user input while processing
Keep the cancel button active for aborting the operation
For example, consider a "Rename Item" alert with a text field:
User enters new name in text field
User taps "Save" button
App needs to perform async operation (e.g., API call, some file operation over the network)
During this time, I would want to:
Replace "Save" button with progress indicator
Disable text field during save
Keep "Cancel" button enabled for abort option
There’s a hacky workaround at the moment, but it’s anything but elegant.
Files
The text was updated successfully, but these errors were encountered:
.alert
ProgressView
Description
SwiftUI alerts currently lack support for showing loading states when performing asynchronous tasks, which makes it difficult to provide feedback during operations that take time to complete. See attachment for what my ideal outcome looks like.
Current Behavior:
When using SwiftUI alerts with buttons that trigger async operations (like saving data or making network requests), there's no great way to:
For example, consider a "Rename Item" alert with a text field:
During this time, I would want to:
There’s a hacky workaround at the moment, but it’s anything but elegant.
Files
The text was updated successfully, but these errors were encountered: