Skip to content

Commit

Permalink
Remove navigation order hijacking.
Browse files Browse the repository at this point in the history
Earlier, we move the selected kind and stories to the top.
It's kind a weird and discussed on #21
  • Loading branch information
arunoda committed Apr 4, 2016
1 parent 33e02aa commit 166365f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/client/ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 166365f

Please sign in to comment.