11import React from 'react' ;
22import ReactTooltip from 'react-tooltip' ;
33import { iconColors , iconSizes , ID_MAX_LENGTH } from '../../../../../constants' ;
4- import {
5- truncate ,
6- formatDateToDisplayOnTable ,
7- } from '../../../../../utils' ;
4+ import { truncate , formatDateToDisplayOnTable } from '../../../../../utils' ;
85import {
96 Box ,
107 FlexBox ,
@@ -20,6 +17,7 @@ import { useService } from './ForSorting/useServiceForSorting';
2017import _ from 'lodash' ;
2118
2219export const GetHeaderCols = ( {
20+ expendedRow,
2321 openPipelineIds,
2422 setOpenPipelineIds,
2523 filteredPipelines,
@@ -29,6 +27,7 @@ export const GetHeaderCols = ({
2927 setActiveSortingDirection,
3028 setActiveSorting,
3129} : {
30+ expendedRow ?: any ;
3231 openPipelineIds : TId [ ] ;
3332 setOpenPipelineIds : ( ids : TId [ ] ) => void ;
3433 filteredPipelines : TPipeline [ ] ;
@@ -70,9 +69,15 @@ export const GetHeaderCols = ({
7069 style = { { paddingTop : '5px' , paddingBottom : '5px' } }
7170 >
7271 { openPipelineIds . indexOf ( pipeline . id ) === - 1 ? (
73- < icons . chevronDownLight color = { iconColors . grey } size = { iconSizes . sm } />
72+ < icons . chevronDownLight
73+ color = { iconColors . grey }
74+ size = { iconSizes . sm }
75+ />
7476 ) : (
75- < icons . chevronUpLight color = { iconColors . grey } size = { iconSizes . sm } />
77+ < icons . chevronUpLight
78+ color = { iconColors . grey }
79+ size = { iconSizes . sm }
80+ />
7681 ) }
7782 </ FlexBox >
7883 </ LinkBox >
@@ -81,6 +86,9 @@ export const GetHeaderCols = ({
8186 {
8287 render : ( ) => (
8388 < SortingHeader
89+ onlyOneRow = {
90+ filteredPipelines . length === 1 || expendedRow ?. length === 1
91+ }
8492 sorting = "id"
8593 sortMethod = { sortMethod ( 'id' , {
8694 asc : ( filteredPipelines : TPipeline [ ] ) =>
@@ -116,6 +124,9 @@ export const GetHeaderCols = ({
116124 {
117125 render : ( ) => (
118126 < SortingHeader
127+ onlyOneRow = {
128+ filteredPipelines . length === 1 || expendedRow ?. length === 1
129+ }
119130 sorting = "name"
120131 sortMethod = { sortMethod ( 'name' , {
121132 asc : ( filteredPipelines : TPipeline [ ] ) =>
@@ -159,6 +170,9 @@ export const GetHeaderCols = ({
159170 {
160171 render : ( ) => (
161172 < SortingHeader
173+ onlyOneRow = {
174+ filteredPipelines . length === 1 || expendedRow ?. length === 1
175+ }
162176 sorting = "user_id"
163177 sortMethod = { sortMethod ( 'user_id' , {
164178 asc : ( filteredPipelines : TPipeline [ ] ) =>
@@ -217,6 +231,9 @@ export const GetHeaderCols = ({
217231 {
218232 render : ( ) => (
219233 < SortingHeader
234+ onlyOneRow = {
235+ filteredPipelines . length === 1 || expendedRow ?. length === 1
236+ }
220237 sorting = "created"
221238 sortMethod = { sortMethod ( 'created' , {
222239 asc : ( filteredPipelines : TPipeline [ ] ) =>
0 commit comments