From 8bd67d88b552d6c74bbd68ccd77eccc46e3ae471 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Tue, 18 Feb 2020 13:21:53 +0100 Subject: [PATCH] [ML] Pass id only to clone action. --- .../components/transform_list/action_clone.tsx | 8 +++----- .../components/transform_list/actions.tsx | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/action_clone.tsx b/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/action_clone.tsx index a04c337fbe8274..40098ac7ef72ad 100644 --- a/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/action_clone.tsx +++ b/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/action_clone.tsx @@ -14,15 +14,13 @@ import { AuthorizationContext, } from '../../../../lib/authorization'; -import { TransformListRow } from '../../../../common'; - import { CLIENT_BASE_PATH, SECTION_SLUG } from '../../../../constants'; interface CloneActionProps { - item: TransformListRow; + itemId: string; } -export const CloneAction: FC = ({ item }) => { +export const CloneAction: FC = ({ itemId }) => { const history = useHistory(); const { canCreateTransform } = useContext(AuthorizationContext).capabilities; @@ -32,7 +30,7 @@ export const CloneAction: FC = ({ item }) => { }); function clickHandler() { - history.push(`${CLIENT_BASE_PATH}/${SECTION_SLUG.CLONE_TRANSFORM}/${item.id}`); + history.push(`${CLIENT_BASE_PATH}/${SECTION_SLUG.CLONE_TRANSFORM}/${itemId}`); } const cloneButton = ( diff --git a/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/actions.tsx b/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/actions.tsx index 211319642402b2..3e3829973e328e 100644 --- a/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/actions.tsx +++ b/x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/actions.tsx @@ -24,7 +24,7 @@ export const getActions = ({ forceDisable }: { forceDisable: boolean }) => { }, { render: (item: TransformListRow) => { - return ; + return ; }, }, {