Partial sorting

This commit is contained in:
James Barnsley
2016-12-09 18:47:10 +13:00
parent f89189c715
commit 26b069faa7
7 changed files with 69 additions and 17 deletions

View File

@ -72,10 +72,10 @@ export function dragEnd(){
return { type: 'DRAG_END' }
}
export function setView( view ){
export function set( data ){
return {
type: 'SET_VIEW',
view: view
type: 'UI_SET',
data: data
}
}

View File

@ -10,13 +10,8 @@ export default function reducer(ui = {}, action){
case 'DEBUG':
return Object.assign({}, ui, { debug_response: action.response })
/**
* UI views and view modes
**/
case 'SET_VIEW':
return Object.assign({}, ui, action.view)
case 'UI_SET':
return Object.assign({}, ui, action.data)
case 'TOGGLE_SIDEBAR':
var new_state = !ui.sidebar_open