From ca647aa8b952a2d75670709340e27bd14e63d0bf Mon Sep 17 00:00:00 2001 From: jose-granja Date: Sun, 5 Aug 2018 17:59:22 +0200 Subject: [PATCH] sorting by kind and nested stories --- lib/ui/src/modules/ui/libs/filters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/src/modules/ui/libs/filters.js b/lib/ui/src/modules/ui/libs/filters.js index 2987c17cdb37..73e5586a244f 100755 --- a/lib/ui/src/modules/ui/libs/filters.js +++ b/lib/ui/src/modules/ui/libs/filters.js @@ -19,7 +19,9 @@ const searchOptions = { function sort(stories, sortStoriesByKind) { if (!sortStoriesByKind) return stories; - return sortBy(stories, ['kind']); + return sortBy(stories, ['kind']).map(item => + Object.assign({}, item, { stories: item.stories.sort() }) + ); } function flattenStories(items) {