21128: clicking row now checks box Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados-workbench2.git] / src / store / multiselect / multiselect-actions.tsx
index 1c329a9e90496bb87b168e55b8302c9808f6c555..c5ad4948b5a2ee569ba6f3ae9ddf555f84a9f8b2 100644 (file)
@@ -7,6 +7,7 @@ import { TCheckedList } from "components/data-table/data-table";
 export const multiselectActionContants = {
     TOGGLE_VISIBLITY: "TOGGLE_VISIBLITY",
     SET_CHECKEDLIST: "SET_CHECKEDLIST",
+    SELECT_ONE: 'SELECT_ONE',
     DESELECT_ONE: "DESELECT_ONE",
 };
 
@@ -22,6 +23,12 @@ export const setCheckedListOnStore = (checkedList: TCheckedList) => {
     };
 };
 
+export const selectOne = (uuid: string) => {
+    return dispatch => {
+        dispatch({ type: multiselectActionContants.SELECT_ONE, payload: uuid });
+    };
+};
+
 export const deselectOne = (uuid: string) => {
     return dispatch => {
         dispatch({ type: multiselectActionContants.DESELECT_ONE, payload: uuid });
@@ -31,5 +38,6 @@ export const deselectOne = (uuid: string) => {
 export const multiselectActions = {
     toggleMSToolbar,
     setCheckedListOnStore,
+    selectOne,
     deselectOne,
 };