11import _ from 'lodash' ;
2- import React , { useState } from 'react' ;
2+ import React from 'react' ;
33import ReactTooltip from 'react-tooltip' ;
44import { iconColors , iconSizes , ID_MAX_LENGTH } from '../../../../../constants' ;
55import {
@@ -11,7 +11,7 @@ import {
1111 Box ,
1212 FlexBox ,
1313 icons ,
14- LinkBox ,
14+ // LinkBox,
1515 Paragraph ,
1616} from '../../../../components' ;
1717import { HeaderCol } from '../../../common/Table' ;
@@ -21,7 +21,7 @@ import { useService } from './ForSorting/useServiceForSorting';
2121
2222export const GetHeaderCols = ( {
2323 expendedRow,
24- openStackIds,
24+ // openStackIds,
2525 setOpenStackIds,
2626 filteredStacks,
2727 setFilteredStacks,
@@ -49,35 +49,45 @@ export const GetHeaderCols = ({
4949 filteredStacks,
5050 } ) ;
5151
52- const [ toggle , setToggle ] = useState ( false ) ;
52+ // const [toggle, setToggle] = useState(false);
5353 return [
5454 {
5555 width : '3%' ,
5656 renderRow : ( stack : TStack ) => (
57- < LinkBox
58- onClick = { ( e : Event ) => {
59- setToggle ( ! toggle ) ;
60- e . stopPropagation ( ) ;
61- if ( openStackIds . indexOf ( stack . id ) === - 1 ) {
62- setOpenStackIds ( [ ...openStackIds , stack . id ] ) ;
63- } else {
64- setOpenStackIds (
65- openStackIds . filter ( ( id : TId ) => id !== stack . id ) ,
66- ) ;
67- }
68- } }
57+ < FlexBox
58+ justifyContent = "center"
59+ style = { { paddingTop : '5px' , paddingBottom : '5px' } }
6960 >
70- < FlexBox
71- justifyContent = "center"
72- style = { { paddingTop : '5px' , paddingBottom : '5px' } }
73- >
74- { openStackIds . indexOf ( stack . id ) === - 1 ? (
75- < icons . rightArrow color = { iconColors . grey } size = { iconSizes . sm } />
76- ) : (
77- < icons . chevronDown color = { iconColors . grey } size = { iconSizes . sm } />
78- ) }
79- </ FlexBox >
80- </ LinkBox >
61+ { expendedRow . length === 1 ? (
62+ < icons . chevronDown color = { iconColors . grey } size = { iconSizes . sm } />
63+ ) : (
64+ < icons . rightArrow color = { iconColors . grey } size = { iconSizes . sm } />
65+ ) }
66+ </ FlexBox >
67+ // <LinkBox
68+ // onClick={(e: Event) => {
69+ // setToggle(!toggle);
70+ // e.stopPropagation();
71+ // if (openStackIds.indexOf(stack.id) === -1) {
72+ // setOpenStackIds([...openStackIds, stack.id]);
73+ // } else {
74+ // setOpenStackIds(
75+ // openStackIds.filter((id: TId) => id !== stack.id),
76+ // );
77+ // }
78+ // }}
79+ // >
80+ // <FlexBox
81+ // justifyContent="center"
82+ // style={{ paddingTop: '5px', paddingBottom: '5px' }}
83+ // >
84+ // {openStackIds.indexOf(stack.id) === -1 ? (
85+ // <icons.rightArrow color={iconColors.grey} size={iconSizes.sm} />
86+ // ) : (
87+ // <icons.chevronDown color={iconColors.grey} size={iconSizes.sm} />
88+ // )}
89+ // </FlexBox>
90+ // </LinkBox>
8191 ) ,
8292 } ,
8393 {
0 commit comments