A hacky workaround I found for having a hover state, a fill, and a select state that don't conflict - pass the $selectedCase all the way down to Case Row and then use it as a condition to apply my .rowBackground() styling. So the styling only gets applied to the items that are not selected. It prevents a grey box inside the blue select box.
It's not perfect because the $selectedCase only gets updated on full click, so when you just click (without releasing just yet), the previously selected case gets no container at all and the case you're about to select has the grey container inside blue selected one. But it's pretty fast so not as much of an issue. I tried things like .simultaneousGesture(TapGesture().onEnded { ... } to pass a hover state to the CaseRow to remove / apply the styling on mouse down instead of full click but couldn't figure it out.
If someone knows a way to modify the native selected state or evolve this solution with the mouse down logic, would appreciate your help.
Post
Replies
Boosts
Views
Activity
.fixedSize() fixes the issue with a cut off button container:
Menu {
// etc
} label: {
Image(systemName: "arrow.up.arrow.down")
}
.menuIndicator(.hidden)
.fixedSize()
Same issue, couldn’t find a solution on macOS - scrolling has no animation when using scrollTo
Phew I thought something was wrong with my account - https://developer.apple.com/forums/thread/742350
Can't access a bunch of pages getting stuck in Sign In loops. Time to go to sleep.