Skip to content

Commit 166365f

Browse files
committed
Remove navigation order hijacking.
Earlier, we move the selected kind and stories to the top. It's kind a weird and discussed on #21
1 parent 33e02aa commit 166365f

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/client/ui/controls.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@ import React from 'react';
22

33
export default class StorybookControls extends React.Component {
44
getKindNames() {
5-
const { storyStore, selectedKind } = this.props;
5+
const { storyStore } = this.props;
66
if (!storyStore) {
77
return [];
88
}
99

10-
const kinds = storyStore.map(({ kind }) => kind);
11-
const selectedKindIndex = kinds.indexOf(selectedKind);
12-
13-
// add the selected kind to the top of the list
14-
kinds.splice(selectedKindIndex, 1);
15-
kinds.unshift(selectedKind);
16-
17-
return kinds;
10+
return storyStore.map(({ kind }) => kind);
1811
}
1912

2013
getStories(kind) {

0 commit comments

Comments
 (0)