mapItemDetailSheet Behavior Question

I'm on MacOS 15 Beta and Xcode 16 Beta. Running iOS 18 Beta on a 15 Pro Max.

I'm leveraging the .mapItemDetailSheet(item: input) option to pull up a sheet that displays the Place Card for a selection made from a List of places.

What I'm seeing is that the first tap fails to pull up the sheet and it auto closes pretty much immediately. But then loads correctly on the second tap. Other times it will not auto close, but simply fail to load the item details in the sheet. Again, though, if I close the sheet and tap a second time it loads without issue.

I'm posting to get some feedback as to whether this is most likely caused by bad code (I'm very new to this) or if it is known behavior and due to the Beta software. Any insight from the community would be helpful. Thanks in advance.

Answered by ryrous in 791631022

I believe this may have been a code issue on my part.

Simply moving .mapItemDetailSheet(item: input) below the closing bracket for my NavigationView seems to have resolved the issue.

Regards

Accepted Answer

I believe this may have been a code issue on my part.

Simply moving .mapItemDetailSheet(item: input) below the closing bracket for my NavigationView seems to have resolved the issue.

Regards

mapItemDetailSheet Behavior Question
 
 
Q