X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/785a62a8934dc439cbd201d9011775ccbcbb2c24..a1e2b8ba77e4a7273940a3fc542bc42e282618a7:/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 } })); };