Skip to content

Commit

Permalink
fix: set initial state of shrinkedButton to true, updated useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardIvanov22 committed Dec 6, 2021
1 parent 4247b98 commit b70d151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/organisms/ActionsPane/ActionsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const ActionsPane = (props: {contentHeight: string}) => {
const isActionsPaneFooterExpanded = useAppSelector(state => state.ui.isActionsPaneFooterExpanded);
const kubeconfigPath = useAppSelector(state => state.config.kubeconfigPath);
const [key, setKey] = useState('source');
const [isButtonShrinked, setButtonShrinkedState] = useState<boolean>();
const [isButtonShrinked, setButtonShrinkedState] = useState<boolean>(true);

const dispatch = useAppDispatch();

Expand Down Expand Up @@ -331,7 +331,7 @@ const ActionsPane = (props: {contentHeight: string}) => {
if (tabsList && tabsList.length && extraButton.current) {
getDistanceBetweenTwoComponents();
}
}, [tabsList, extraButton.current, uiState.paneConfiguration, windowSize]);
}, [tabsList, extraButton.current, uiState.paneConfiguration, windowSize, selectedResource]);

return (
<>
Expand Down

0 comments on commit b70d151

Please sign in to comment.