From 166365fd38f51f79e69e028a1c11e2620eddcb99 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Mon, 4 Apr 2016 12:06:58 +0530 Subject: [PATCH] Remove navigation order hijacking. Earlier, we move the selected kind and stories to the top. It's kind a weird and discussed on #21 --- src/client/ui/controls.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/client/ui/controls.js b/src/client/ui/controls.js index c6979551d46a..8e46919d39b1 100644 --- a/src/client/ui/controls.js +++ b/src/client/ui/controls.js @@ -2,19 +2,12 @@ import React from 'react'; export default class StorybookControls extends React.Component { getKindNames() { - const { storyStore, selectedKind } = this.props; + const { storyStore } = this.props; if (!storyStore) { return []; } - const kinds = storyStore.map(({ kind }) => kind); - const selectedKindIndex = kinds.indexOf(selectedKind); - - // add the selected kind to the top of the list - kinds.splice(selectedKindIndex, 1); - kinds.unshift(selectedKind); - - return kinds; + return storyStore.map(({ kind }) => kind); } getStories(kind) {