Skip to content

Commit fb107ad

Browse files
authored
RI-7637 Loading indicator for tables in Browser keys details (#5104)
* fix(ui): bring back loading indicator for tables in browsers keys details
1 parent bd51632 commit fb107ad

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

redisinsight/ui/src/components/base/display/progress-bar/progress-bar-loader.styles.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ interface LoaderContainerProps {
6666
children?: ReactNode
6767
style?: React.CSSProperties
6868
className?: string
69+
absolute?: boolean
6970
}
7071

7172
export const LoaderContainer = styled.div<LoaderContainerProps>`
72-
position: relative;
73+
position: ${({ absolute }) => (absolute ? 'absolute' : 'relative')};
74+
width: 100%;
7375
height: 3px;
7476
overflow: hidden;
7577
border-radius: 2px;

redisinsight/ui/src/components/virtual-table/VirtualTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ const VirtualTable = (props: IProps) => {
603603
>
604604
{loading && !hideProgress && (
605605
<ProgressBarLoader
606+
absolute
606607
color="primary"
607608
data-testid="progress-key-table"
608609
/>

redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/hash-details-table/HashDetailsTable.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ const HashDetailsTable = (props: Props) => {
382382
)
383383

384384
return (
385-
<Text color="secondary"
385+
<Text
386+
color="secondary"
386387
style={{ maxWidth: '100%', whiteSpace: 'break-spaces' }}
387388
component="div"
388389
>
@@ -528,9 +529,7 @@ const HashDetailsTable = (props: Props) => {
528529
testid={`remove-hash-button-${field}`}
529530
handleDeleteItem={handleDeleteField}
530531
handleButtonClick={handleRemoveIconClick}
531-
appendInfo={
532-
length === 1 ? HelpTexts.REMOVE_LAST_ELEMENT() : null
533-
}
532+
appendInfo={length === 1 ? HelpTexts.REMOVE_LAST_ELEMENT() : null}
534533
/>
535534
</StopPropagation>
536535
)
@@ -607,7 +606,6 @@ const HashDetailsTable = (props: Props) => {
607606
)}
608607
>
609608
<VirtualTable
610-
hideProgress
611609
expandable
612610
autoHeight
613611
tableRef={tableRef}

redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/list-details-table/ListDetailsTable.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ const ListDetailsTable = () => {
385385
>
386386
<VirtualTable
387387
autoHeight
388-
hideProgress
389388
expandable
390389
tableRef={tableRef}
391390
selectable={false}

redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/set-details-table/SetDetailsTable.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ const SetDetailsTable = (props: Props) => {
290290
handleDeleteItem={handleDeleteMember}
291291
handleButtonClick={handleRemoveIconClick}
292292
testid={`set-remove-btn-${member}`}
293-
appendInfo={
294-
length === 1 ? HelpTexts.REMOVE_LAST_ELEMENT() : null
295-
}
293+
appendInfo={length === 1 ? HelpTexts.REMOVE_LAST_ELEMENT() : null}
296294
/>
297295
</div>
298296
)
@@ -324,7 +322,6 @@ const SetDetailsTable = (props: Props) => {
324322
>
325323
<VirtualTable
326324
autoHeight
327-
hideProgress
328325
expandable
329326
selectable={false}
330327
keyName={key}

redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/zset-details-table/ZSetDetailsTable.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,6 @@ const ZSetDetailsTable = (props: Props) => {
496496
<VirtualTable
497497
autoHeight
498498
tableRef={tableRef}
499-
hideProgress
500499
expandable
501500
keyName={key}
502501
headerHeight={headerHeight}

0 commit comments

Comments
 (0)