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

Fix dropdown/menu components not providing items in correct order #6079

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

frenzibyte
Copy link
Member

The change in Dropdown is quite ugly, I would rather let the component always store a bindable list and get away with the extra list storage, but I'm not fully confident about pushing such change any time soon.

@@ -62,7 +62,7 @@ public abstract partial class Menu : CompositeDrawable, IStateful<MenuState>
/// <summary>
/// Gets the item representations contained by this <see cref="Menu"/>.
/// </summary>
protected internal IReadOnlyList<DrawableMenuItem> Children => itemsFlow.Children;
protected internal IEnumerable<DrawableMenuItem> Children => itemsFlow.Children.OrderBy(c => itemsFlow.GetLayoutPosition(c));
Copy link
Member Author

Choose a reason for hiding this comment

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

In case anyone asks, we cannot use FlowingChildren here as it filters the items by extra properties that are not wanted (life state).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant