Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] Cannot unhide a menu item if it starts hidden #4088

Open
IanVS opened this issue Feb 18, 2025 · 0 comments
Open

[v3] Cannot unhide a menu item if it starts hidden #4088

IanVS opened this issue Feb 18, 2025 · 0 comments
Labels
Bug Something isn't working

Comments

@IanVS
Copy link

IanVS commented Feb 18, 2025

Description

After the fix for #4077, it's not possible to to unhide (show) a menu item that starts off as hidden.

To Reproduce

In the menu example, add this:

	// Hidden menu item
	hidden := myMenu.Add("Hidden").SetHidden(true)

	// Unhide callback
	myMenu.Add("Toggle hidden").OnClick(func(ctx *application.Context) {
		hidden.SetHidden(!hidden.Hidden())
	})

Then start the example, and click the Toggle hidden menu item. The "Hidden" menu item is not shown (bug).

If you remove the .SetHidden(true) from hidden, then toggling works correctly, both hiding and unhiding.

Expected behaviour

I should be able to unhide a menu item that starts off hidden.

Screenshots

No response

Attempted Fixes

No response

System Details

# System

┌──────────────────────────────────────────────────┐
| Name          | MacOS                            |
| Version       | 15.2                             |
| ID            | 24C101                           |
| Branding      | Sequoia                          |
| Platform      | darwin                           |
| Architecture  | arm64                            |
| Apple Silicon | true                             |
| CPU           | Apple M2 Max                     |
| CPU 1         | Apple M2 Max                     |
| CPU 2         | Apple M2 Max                     |
| GPU           | 30 cores, Metal Support: Metal 3 |
| Memory        | 64 GB                            |
└──────────────────────────────────────────────────┘

# Build Environment

┌─────────────────────────────────────────────────────────┐
| Wails CLI    | v3.0.0-dev                               |
| Go Version   | go1.24.0                                 |
| Revision     | 5059adc561a9613f943bb9bb1e17d55c83717631 |
| Modified     | false                                    |
| -buildmode   | exe                                      |
| -compiler    | gc                                       |
| CGO_CFLAGS   |                                          |
| CGO_CPPFLAGS |                                          |
| CGO_CXXFLAGS |                                          |
| CGO_ENABLED  | 1                                        |
| CGO_LDFLAGS  |                                          |
| GOARCH       | arm64                                    |
| GOARM64      | v8.0                                     |
| GOOS         | darwin                                   |
| vcs          | git                                      |
| vcs.modified | false                                    |
| vcs.revision | 5059adc561a9613f943bb9bb1e17d55c83717631 |
| vcs.time     | 2025-02-16T05:02:25Z                     |
└─────────────────────────────────────────────────────────┘

# Dependencies

┌───────────────────────────┐
| Xcode cli tools | 2409    |
| npm             | 10.9.2  |
| *NSIS           | v3.10   |
|                           |
└─ * - Optional Dependency ─┘

# Checking for issues

 SUCCESS  No issues found

# Diagnosis

 SUCCESS  Your system is ready for Wails development!

Additional context

Discord thread: https://discord.com/channels/1042734330029547630/1334926670070677555/1334926670070677555

@IanVS IanVS added the Bug Something isn't working label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant