@@ -74,8 +74,10 @@ const KeyList = forwardRef((props: Props, ref) => {
74
74
const { keyList : { scrollTopPosition } } = useSelector ( appContextBrowser )
75
75
76
76
const [ , rerender ] = useState ( { } )
77
+ const [ firstDataLoaded , setFirstDataLoaded ] = useState ( ! ! keysState . keys . length )
77
78
78
79
const itemsRef = useRef ( keysState . keys )
80
+ const isNotRendered = useRef ( true )
79
81
const renderedRowsIndexesRef = useRef ( { startIndex : 0 , lastIndex : 0 } )
80
82
81
83
const dispatch = useDispatch ( )
@@ -98,6 +100,12 @@ const KeyList = forwardRef((props: Props, ref) => {
98
100
99
101
useEffect ( ( ) => {
100
102
itemsRef . current = [ ...keysState . keys ]
103
+
104
+ if ( ! isNotRendered . current && ! loading ) {
105
+ setFirstDataLoaded ( true )
106
+ }
107
+
108
+ isNotRendered . current = false
101
109
if ( itemsRef . current . length === 0 ) {
102
110
rerender ( { } )
103
111
return
@@ -122,6 +130,9 @@ const KeyList = forwardRef((props: Props, ref) => {
122
130
}
123
131
124
132
const getNoItemsMessage = ( ) => {
133
+ if ( isNotRendered . current ) {
134
+ return ''
135
+ }
125
136
if ( total === 0 ) {
126
137
return NoKeysToDisplayText ( Pages . workbench ( instanceId ) , onNoKeysLinkClick )
127
138
}
@@ -359,7 +370,7 @@ const KeyList = forwardRef((props: Props, ref) => {
359
370
columns = { columns }
360
371
loadMoreItems = { onLoadMoreItems }
361
372
onWheel = { onWheelSearched }
362
- loading = { loading }
373
+ loading = { loading || ! firstDataLoaded }
363
374
items = { itemsRef . current }
364
375
totalItemsCount = { keysState . total ? keysState . total : Infinity }
365
376
scanned = { isSearched || isFiltered ? keysState . scanned : 0 }
0 commit comments