Skip to content

Commit 139065a

Browse files
author
Artem
committed
show "No Results Found" message for redisearch
1 parent 961ce87 commit 139065a

File tree

1 file changed

+15
-5
lines changed
  • redisinsight/ui/src/pages/browser/components/key-list

1 file changed

+15
-5
lines changed

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,25 @@ const KeyList = forwardRef((props: Props, ref) => {
159159
if (isNotRendered.current) {
160160
return ''
161161
}
162-
if (searchMode === SearchMode.Redisearch && !selectedIndex) {
163-
return NoSelectedIndexText
162+
163+
if (searchMode === SearchMode.Redisearch) {
164+
if (!selectedIndex) {
165+
return NoSelectedIndexText
166+
}
167+
168+
if (total === 0) {
169+
return NoResultsFoundText
170+
}
171+
172+
if (isSearched) {
173+
return keysState.scanned < total ? NoResultsFoundText : FullScanNoResultsFoundText
174+
}
164175
}
176+
165177
if (total === 0) {
166178
return NoKeysToDisplayText(Pages.workbench(instanceId), onNoKeysLinkClick)
167179
}
168-
if (isSearched && searchMode === SearchMode.Redisearch) {
169-
return keysState.scanned < total ? NoResultsFoundText : FullScanNoResultsFoundText
170-
}
180+
171181
if (isSearched) {
172182
return keysState.scanned < total ? ScanNoResultsFoundText : FullScanNoResultsFoundText
173183
}

0 commit comments

Comments
 (0)