21316: Merge commit '1416f698b72de4b09350d9c2fb25c1405c3247bc' into 21316-left-panel...
[arvados.git] / services / workbench2 / src / store / side-panel / side-panel-action.ts
index e4f53ceaa6be6df93c35c0831fb4d8c93d986d59..644f76cd4ac53007ff1f9d171c4dfcb8e848d655 100644 (file)
@@ -6,7 +6,8 @@ import { Dispatch } from 'redux';
 import { navigateTo } from 'store/navigation/navigation-action';
 
 export const sidePanelActions = {
-    TOGGLE_COLLAPSE: 'TOGGLE_COLLAPSE'
+    TOGGLE_COLLAPSE: 'TOGGLE_COLLAPSE',
+    SET_CURRENT_WIDTH: 'SET_CURRENT_WIDTH'
 }
 
 export const navigateFromSidePanel = (id: string) =>
@@ -18,4 +19,10 @@ export const toggleSidePanel = (collapsedState: boolean) => {
     return (dispatch) => {
         dispatch({type: sidePanelActions.TOGGLE_COLLAPSE, payload: !collapsedState})
     }
+}
+
+export const setCurrentSideWidth = (width: number) => {
+    return (dispatch) => {
+        dispatch({type: sidePanelActions.SET_CURRENT_WIDTH, payload: width})
+    }
 }
\ No newline at end of file