Skip to content

Commit

Permalink
fix: expand folders
Browse files Browse the repository at this point in the history
  • Loading branch information
emirotin committed May 18, 2018
1 parent 2fe290f commit 6c0387e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
Expand Up @@ -13,11 +13,6 @@ const style = require('./style.scss')

export default class FlowsList extends Component {
// renderFlow(flow, index) {
// const isCurrentFlow = flow.name === _.get(this.props, 'currentFlow.name')
// const isDirty = _.includes(this.props.dirtyFlows, flow.name)

// const dirtyMarker = isDirty ? '*' : ''

// const hideOverlay = () => {
// this.setState({
// showDropdownIndex: -1
Expand Down Expand Up @@ -98,18 +93,8 @@ export default class FlowsList extends Component {

// const lgProps = isCurrentFlow ? { key: index } : { href: 'javascript:void(0);', key: index }

// let displayName = flow.name
// const { stripPrefix } = this.props
// if (stripPrefix && displayName.startsWith(stripPrefix)) {
// displayName = displayName.substr(stripPrefix.length)
// }

// return (
// <ListGroupItem {...lgProps}>
// <div onClick={() => this.props.goToFlow(flow.name)}>
// {displayName}
// {dirtyMarker} {isCurrentFlow ? ' (current)' : ''}
// </div>
// <div className={style.menuButton}>{caret}</div>
// {overlay}
// </ListGroupItem>
Expand Down Expand Up @@ -158,6 +143,5 @@ export default class FlowsList extends Component {
const { dirtyFlows } = this.props
const { treeData } = this.state
return <Tree data={treeData} dirtyFlows={dirtyFlows} onToggle={this.toggleTreeNode} />
// return <ListGroup className={style.list}>{this.props.flows.map((f, i) => this.renderFlow(f, i))}</ListGroup>
}
}
Expand Up @@ -6,15 +6,6 @@
line-height: 24px;
}

// .list {
// :global(.list-group-item) {
// border-top-left-radius: 0px;
// border-top-right-radius: 0px;
// border: 0px solid #ddd;
// padding: 5px 5px;
// }
// }

// .menuButton {
// position: absolute;
// right: 10px;
Expand Down
Expand Up @@ -8,6 +8,9 @@ const addNode = (tree, path, name, data) => {
folder = { name: folderName, type: 'folder', children: [] }
tree.children.push(folder)
}
if (data.active) {
folder.toggled = true
}
tree = folder
}
tree.children.push({ name, type: 'file', ...data })
Expand Down

0 comments on commit 6c0387e

Please sign in to comment.