I noticed if the Button's title is dynamic it breaks .disabled() from working, e.g.
Button("Save \(text)") { // dynamic title
items.append(ListItem(text: text))
}
.disabled(text.isEmpty) // no worky anymore
Xcode 16.2, iOS simulator 18.2
Submitted FB16539507 to request the .alert() docs be updated to state if using .disabled is supported because currently it is not mentioned. Also included this bug I noticed which is probably a waste of time since I reported the bug to the documentation team.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: