@@ -7,19 +7,15 @@ import {
77 formatDateToSort ,
88 formatDateToDisplayOnTable ,
99} from '../../../../../utils' ;
10- import {
11- Box ,
12- FlexBox ,
13- icons ,
14- Paragraph ,
15- } from '../../../../components' ;
10+ import { Box , FlexBox , icons , Paragraph } from '../../../../components' ;
1611import { HeaderCol } from '../../../common/Table' ;
1712import { SortingHeader } from './ForSorting/SortingHeader' ;
1813import { Sorting , SortingDirection } from './ForSorting/types' ;
1914
2015import { useService } from './ForSorting/useServiceForSorting' ;
2116
2217export const GetHeaderCols = ( {
18+ expendedRow,
2319 openStackIds,
2420 setOpenStackIds,
2521 filteredStacks,
@@ -29,6 +25,7 @@ export const GetHeaderCols = ({
2925 setActiveSortingDirection,
3026 setActiveSorting,
3127} : {
28+ expendedRow ?: any ;
3229 openStackIds : TId [ ] ;
3330 setOpenStackIds : ( ids : TId [ ] ) => void ;
3431 filteredStacks : TStack [ ] ;
@@ -46,6 +43,8 @@ export const GetHeaderCols = ({
4643 activeSortingDirection,
4744 filteredStacks,
4845 } ) ;
46+
47+ console . log ( expendedRow , 'expendedRow' ) ;
4948 return [
5049 {
5150 width : '2%' ,
@@ -55,6 +54,7 @@ export const GetHeaderCols = ({
5554 {
5655 render : ( ) => (
5756 < SortingHeader
57+ onlyOneRow = { filteredStacks . length === 1 || expendedRow ?. length === 1 }
5858 sorting = "id"
5959 sortMethod = { sortMethod ( 'id' , {
6060 asc : ( filteredStacks : TStack [ ] ) =>
@@ -87,6 +87,7 @@ export const GetHeaderCols = ({
8787 {
8888 render : ( ) => (
8989 < SortingHeader
90+ onlyOneRow = { filteredStacks . length === 1 || expendedRow ?. length === 1 }
9091 sorting = "name"
9192 sortMethod = { sortMethod ( 'name' , {
9293 asc : ( filteredStacks : TStack [ ] ) =>
@@ -119,6 +120,7 @@ export const GetHeaderCols = ({
119120 {
120121 render : ( ) => (
121122 < SortingHeader
123+ onlyOneRow = { filteredStacks . length === 1 || expendedRow ?. length === 1 }
122124 sorting = "flavor"
123125 sortMethod = { sortMethod ( 'flavor' , {
124126 asc : ( filteredStacks : TStack [ ] ) =>
@@ -151,6 +153,7 @@ export const GetHeaderCols = ({
151153 {
152154 render : ( ) => (
153155 < SortingHeader
156+ onlyOneRow = { filteredStacks . length === 1 || expendedRow ?. length === 1 }
154157 sorting = "is_shared"
155158 sortMethod = { sortMethod ( 'is_shared' , {
156159 asc : ( filteredStacks : TStack [ ] ) =>
@@ -209,6 +212,7 @@ export const GetHeaderCols = ({
209212 {
210213 render : ( ) => (
211214 < SortingHeader
215+ onlyOneRow = { filteredStacks . length === 1 || expendedRow ?. length === 1 }
212216 sorting = "user_id"
213217 sortMethod = { sortMethod ( 'user_id' , {
214218 asc : ( filteredStacks : TStack [ ] ) =>
@@ -226,7 +230,6 @@ export const GetHeaderCols = ({
226230 ) ,
227231 width : '15%' ,
228232 renderRow : ( stackComponent : TStack ) => {
229-
230233 return (
231234 < FlexBox alignItems = "center" >
232235 < div
@@ -267,6 +270,7 @@ export const GetHeaderCols = ({
267270 {
268271 render : ( ) => (
269272 < SortingHeader
273+ onlyOneRow = { filteredStacks . length === 1 || expendedRow ?. length === 1 }
270274 sorting = "created"
271275 sortMethod = { sortMethod ( 'created' , {
272276 asc : ( filteredStacks : TStack [ ] ) =>
0 commit comments