X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8695e9d621330e691fbcc4bbc1d600d91bae2ac6..cc72c29b709759a4498ad232e3f0374e857c7a62:/src/store/keep-services/keep-services-actions.ts diff --git a/src/store/keep-services/keep-services-actions.ts b/src/store/keep-services/keep-services-actions.ts index 1de6802e..54a7c3fe 100644 --- a/src/store/keep-services/keep-services-actions.ts +++ b/src/store/keep-services/keep-services-actions.ts @@ -39,9 +39,9 @@ export const loadKeepServicesPanel = () => } }; -export const openKeepServiceAttributesDialog = (index: number) => +export const openKeepServiceAttributesDialog = (uuid: string) => (dispatch: Dispatch, getState: () => RootState) => { - const keepService = getState().keepServices[index]; + const keepService = getState().keepServices.find(it => it.uuid === uuid); dispatch(dialogActions.OPEN_DIALOG({ id: KEEP_SERVICE_ATTRIBUTES_DIALOG, data: { keepService } })); };