How are you calling this code?
If you have it via command, which calls the Save Panel, that should be a simple fix, but if you are using fileExporter, then you just need to specify the content type, which is easiest to do in the view model.
Post
Replies
Boosts
Views
Activity
I got a reply to my query over on Discord regarding the subject of this thread, and it looks like what I want to do is not possible with SwiftUI at the moment, with the slight suggestion that checkboxes are, due to the video lesson shared here early.
The big hurdle in this is that Bindings are next to impossible in the given situation, which date pickers require, and likely more so with a ForEach in a lazy grid.
As such, I think I am going to mark this as solved, in spite of the situation likely not being fixable until the TableColumn API is refined or a real fix is implemented.
I did some testing today and the problem arises because of functions as seen here, which I had to make to get things working, though tables in SwiftUI in general do not make establishing bindings easy. From what I could see, the set closure is run while scrolling, which is where I am at.
https://github.com/bryceac/BCheckbook/blob/macTable/macOS/Views/ContentView.swift#L417-L441
Ok, it looks like I solved it by comparing my old version of my code with the new.
I was not checking if values were zero, and because I am not sure of a way to do the check. If resorted to creating wrappers, which made it so that important fields did not change with scrolling.