Skip to content

Commit 68e5c68

Browse files
committed
* #RI-3672 - 400 error and key not displayed when searching for key
* #RI-3671 - Keys are not refreshed when there are no keys of selected type
1 parent 8da0330 commit 68e5c68

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

redisinsight/ui/src/pages/browser/components/key-list/KeyList.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const KeyList = forwardRef((props: Props, ref) => {
9999
useEffect(() => {
100100
itemsRef.current = [...keysState.keys]
101101
if (itemsRef.current.length === 0) {
102+
rerender({})
102103
return
103104
}
104105

@@ -168,6 +169,7 @@ const KeyList = forwardRef((props: Props, ref) => {
168169
const newItems = bufferFormatRows(startIndex, lastIndex)
169170

170171
getMetadata(startIndex, lastIndex, newItems)
172+
rerender({})
171173
}, 100)
172174

173175
const bufferFormatRows = (startIndex: number, lastIndex: number): GetKeyInfoResponse[] => {
@@ -199,7 +201,8 @@ const KeyList = forwardRef((props: Props, ref) => {
199201
lastIndex,
200202
loadedItems,
201203
isFirstEmpty: !isSomeNotUndefined(itemsInit[0]),
202-
})
204+
}),
205+
() => { rerender({}) }
203206
))
204207
}
205208

redisinsight/ui/src/utils/formatters/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const bufferFormatRangeItems = (
44
const newItems = []
55
if (lastIndex >= startIndex) {
66
for (let index = startIndex; index <= lastIndex; index++) {
7-
if (!items[index]) return [startIndex, newItems]
7+
if (!items[index]) return newItems
88
newItems.push(formatItem(items[index]))
99
}
1010
}

0 commit comments

Comments
 (0)