| | |
| | | const dragIndex = newOrder.indexOf(dragKey) |
| | | const hoverIndex = newOrder.indexOf(hoverKey) |
| | | |
| | | if (dragIndex === -1) return |
| | | |
| | | newOrder.splice(dragIndex, 1) |
| | | newOrder.splice(hoverIndex, 0, dragKey) |
| | | |
| | |
| | | |
| | | render() { |
| | | const { order } = this.state |
| | | const { children } = this.props |
| | | const { children, ...resProps } = this.props |
| | | const tabs = [] |
| | | React.Children.forEach(children, c => { |
| | | tabs.push(c) |
| | |
| | | |
| | | return ( |
| | | <DndProvider> |
| | | <Tabs renderTabBar={this.renderTabBar} {...this.props}> |
| | | <Tabs renderTabBar={this.renderTabBar} {...resProps}> |
| | | {orderTabs} |
| | | </Tabs> |
| | | </DndProvider> |