From 578a10b36414519e13aa05e94c18e94f7fb8ffe7 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Wed, 2 Dec 2020 14:13:09 -0400 Subject: [PATCH] Cherry-pick: Updated sort order of node auto complete suggestions (#11303) (#11305) * Display input port type specific default suggestions only (#11268) * input port type specific default suggestions * test fix * Node AutoComplete suggestions sorted alphabetically within the same group (#11280) * add/update tests * Updated sort order of node auto complete suggestions (#11303) * update sort order Co-authored-by: Ashish Aggarwal --- .../ViewModels/Search/NodeAutoCompleteSearchViewModel.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs b/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs index 831f608decb..e9555b6a4a3 100644 --- a/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs @@ -190,9 +190,7 @@ internal IEnumerable GetMatchingSearchElements() elements.Sort(comparer); //then sort by node library group (create, action, or query node) //this results in a list of elements with 3 major groups(create,action,query), each group is sub sorted into types and then sorted by name. - return elements.OrderBy(x => x.Group).ThenBy(x => x.Name); - - + return elements.OrderBy(x => x.Group).ThenBy(x => x.OutputParameters.FirstOrDefault().ToString()).ThenBy(x => x.Name); } ///