1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

saving new order in the storage only for now

This commit is contained in:
Matus Benko
2017-09-08 00:09:13 +02:00
parent 0fea85e2f2
commit 9141b1a641

View File

@@ -2,7 +2,7 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './FolderList.styl'
import FolderItem from './FolderItem'
import { SortableContainer } from 'react-sortable-hoc'
import { SortableContainer, arrayMove } from 'react-sortable-hoc'
class FolderList extends React.Component {
constructor (props) {
@@ -58,7 +58,9 @@ class SortableFolderListComponent extends React.Component {
constructor (props) {
super(props)
this.onSortEnd = ({oldIndex, newIndex}) => {
console.log("end")
let { storage } = this.props
storage.folders = arrayMove(storage.folders, oldIndex, newIndex)
this.setState()
}
}