From 574ff3c5e78805106682c9d72eee80f074e60e47 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 29 Oct 2019 12:54:21 -0400 Subject: [PATCH] Spaces - fix react hook deps (#49618) * fix react hook deps * removing lint override for spaces --- .eslintrc.js | 6 ------ .../copy_saved_objects_to_space/copy_to_space_flyout.tsx | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9c81ba6efbd2b..a7b712dabb6c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -229,12 +229,6 @@ module.exports = { 'react-hooks/exhaustive-deps': 'off', }, }, - { - files: ['x-pack/legacy/plugins/spaces/**/*.{js,ts,tsx}'], - rules: { - 'react-hooks/exhaustive-deps': 'off', - }, - }, { files: ['x-pack/legacy/plugins/transform/**/*.{js,ts,tsx}'], rules: { diff --git a/x-pack/legacy/plugins/spaces/public/views/management/components/copy_saved_objects_to_space/copy_to_space_flyout.tsx b/x-pack/legacy/plugins/spaces/public/views/management/components/copy_saved_objects_to_space/copy_to_space_flyout.tsx index 4663b73f1cb7e..7461edcff10e9 100644 --- a/x-pack/legacy/plugins/spaces/public/views/management/components/copy_saved_objects_to_space/copy_to_space_flyout.tsx +++ b/x-pack/legacy/plugins/spaces/public/views/management/components/copy_saved_objects_to_space/copy_to_space_flyout.tsx @@ -72,7 +72,7 @@ export const CopySavedObjectsToSpaceFlyout = (props: Props) => { }), }); }); - }, []); + }, [spacesManager, toastNotifications]); const eligibleSpaces = spaces.filter(space => space.id !== props.activeSpace.id); const [copyInProgress, setCopyInProgress] = useState(false);