5

Do you know how to remove the indicator from the Menu Component? My minimum OS version is 11.0

    Menu {
    Button(action: {
        changeLanguage("ko")
    }) {
        Text("한국어")
    }
    Button(action: {
        changeLanguage("en")
    }) {
        Text("English")
    }
    Button(action: {
        changeLanguage("ja")
    }) {
        Text("日本語")
    }
    Button(action: {
        changeLanguage("zh-Hans")
    }) {
        Text("中国话")
    }
} label : {
    Image("globe")

}
.frame(width: 40, height: 25)
.menuStyle(BorderlessButtonMenuStyle())

enter image description here

I'd like to get rid of the arrow on the right side.

2 Answers 2

10

It looks like showsMenuIndicator is deprecated. Please try something like this:

    Menu {
    
    }
    .menuIndicator(.hidden)
Sign up to request clarification or add additional context in comments.

2 Comments

The .hidden indicator option has an issue with its visual spacing on macOS.
This works just perfect for me. Thanks!
2

You can try this:

.menuStyle(BorderlessButtonMenuStyle(showsMenuIndicator: false))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.