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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user