Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions redisinsight/ui/src/pages/browser/BrowserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const BrowserPage = () => {
}))
}

const selectKey = ({ rowData }: { rowData: any }) => {
const selectKey = useCallback(({ rowData }: { rowData: any }) => {
if (!isEqualBuffers(rowData.name, selectedKeyRef.current)) {
dispatch(toggleBrowserFullScreen(false))

Expand All @@ -198,7 +198,7 @@ const BrowserPage = () => {
closeRightPanels()
prevSelectedType.current = rowData.type
}
}
}, [])

const closePanel = () => {
dispatch(toggleBrowserFullScreen(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ const KeyTree = forwardRef((props: Props, ref) => {
)
})

export default KeyTree
export default React.memo(KeyTree)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react'
import { EuiIcon, EuiTitle, EuiText, EuiSpacer, EuiButton } from '@elastic/eui'
import { EuiTitle, EuiText, EuiSpacer, EuiButton, EuiImage } from '@elastic/eui'
import { useDispatch } from 'react-redux'

import { setBulkActionType } from 'uiSrc/slices/browser/bulkActions'
Expand Down Expand Up @@ -29,10 +29,10 @@ const NoKeysFound = (props: Props) => {

return (
<div className={styles.container} data-testid="no-result-found-msg">
<EuiIcon
<EuiImage
className={styles.img}
type={theme === Theme.Dark ? TelescopeDark : TelescopeLight}
size="original"
src={theme === Theme.Dark ? TelescopeDark : TelescopeLight}
alt="no results image"
/>
<EuiSpacer size="l" />
<EuiText>No Keys Found</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
TreeWalkerValue,
FixedSizeTree as Tree,
} from 'react-vtree'
import { EuiIcon, EuiLoadingSpinner, EuiProgress } from '@elastic/eui'
import { EuiIcon, EuiImage, EuiLoadingSpinner, EuiProgress } from '@elastic/eui'
import { useDispatch } from 'react-redux'

import { bufferToString, Maybe, Nullable } from 'uiSrc/utils'
Expand Down Expand Up @@ -275,7 +275,15 @@ const VirtualTree = (props: Props) => {
<div className={styles.loadingContainer} style={{ width, height }} data-testid="virtual-tree-spinner">
<div className={styles.loadingBody}>
<EuiLoadingSpinner size="xl" className={styles.loadingSpinner} />
<EuiIcon type={loadingIcon || 'empty'} className={styles.loadingIcon} />
{loadingIcon ? (
<EuiImage
className={styles.loadingIcon}
src={loadingIcon}
alt="loading"
/>
) : (
<EuiIcon type="empty" className={styles.loadingIcon} />
)}
</div>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}

.loadingIcon {
position: absolute;
position: absolute !important;
width: 28px !important;
height: 28px !important;
top: 12px;
Expand Down