Change of listRowBackground in SwiftUI for NavigationLink doesn't change the full background

Viewed 21

Code is the following:

List(selection: $selectedBoard) {
    ForEach(boards) { board in
        NavigationLink(tag: board, selection: $selectedBoard) {
            BoardView(board: board)
        } label: {
            Text(board.name ?? "Board")
         }
        .listRowBackground(self.selectedBoard == board ? Color.App.boardSelection : Color.App.boardBackground)

The effect is the following:

enter image description here

See the gray space on the left and right? This is the accent color that I don't know how to remove. The whole row should be the same, uniform color of a bit lighter black.

Working example: https://github.com/igr/Clmn

https://github.com/igr/Clmn/blob/main/Clmn/Views/BoardList/BoardsNavigationListView.swift#L32

0 Answers
Related