Skip to content

Commit 6ac03a9

Browse files
authored
Merge pull request #1440 from RedisInsight/fe/bugfix/fix-not-found-message
show "No Results Found" message for redisearch
2 parents 961ce87 + 139065a commit 6ac03a9

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)