Skip to content

fix(products): menu item selection in product manager#49

Merged
marfavi merged 3 commits intomainfrom
fix-menu-item-selection
Feb 24, 2025
Merged

fix(products): menu item selection in product manager#49
marfavi merged 3 commits intomainfrom
fix-menu-item-selection

Conversation

@marfavi
Copy link
Member

@marfavi marfavi commented Feb 24, 2025

This PR resolves #47.

Now can correctly display and select menu items in the product management page.

This is done by implementing equality members on MenuItem

@marfavi marfavi requested review from A-Guldborg and TTA777 February 24, 2025 17:13
@marfavi marfavi changed the title Fix menu item selection in product manager fix(products): menu item selection in product manager Feb 24, 2025
Copy link
Contributor

@A-Guldborg A-Guldborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right approach, to change to a class? @TTA777 is more knowledgeable on C# practices so I don't know, but there are a few things that confuses me:

The component that displays the menu items is the MudComboBox which in their own example for "Complex Type" (see code under the Chip Customization example) does not override IEquatable.

Likewise, C# documentation for record value equality shows that two records are equal if their values are equal. How does this change then change the equality functionality for our menu items? 😅

@marfavi
Copy link
Member Author

marfavi commented Feb 24, 2025

How does this change then change the equality functionality for our menu items? 😅

Good question. The only answer I can give is that this fixes the issue.

Using other components (like MudSelect or MudSelectExtended) still won't work without this fix.

@marfavi marfavi merged commit 8a064e2 into main Feb 24, 2025
2 checks passed
@marfavi marfavi deleted the fix-menu-item-selection branch February 24, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product management: Eligible menu items broken

3 participants