File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
redisinsight/ui/src/pages/browser/components/virtual-tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -136,17 +136,18 @@ const VirtualTree = (props: Props) => {
136
136
} ) , [ ] )
137
137
138
138
const getMetadata = useCallback ( (
139
- itemsInit : any [ ] = [ ]
139
+ itemsInit : any [ ] = [ ] ,
140
+ filter : Nullable < KeyTypes >
140
141
) : void => {
141
142
dispatch ( fetchKeysMetadataTree (
142
143
itemsInit ,
143
- commonFilterType ,
144
+ filter ,
144
145
controller . current ?. signal ,
145
146
( loadedItems ) =>
146
147
onSuccessFetchedMetadata ( loadedItems ) ,
147
148
( ) => { rerender ( { } ) }
148
149
) )
149
- } , [ commonFilterType ] )
150
+ } , [ ] )
150
151
151
152
const onSuccessFetchedMetadata = (
152
153
loadedItems : any [ ] ,
@@ -158,18 +159,18 @@ const VirtualTree = (props: Props) => {
158
159
rerender ( { } )
159
160
}
160
161
161
- const getMetadataDebounced = debounce ( ( ) => {
162
+ const getMetadataDebounced = debounce ( ( filter : Nullable < KeyTypes > ) => {
162
163
const entries = Object . entries ( elements . current )
163
164
164
- getMetadata ( entries )
165
+ getMetadata ( entries , filter )
165
166
166
167
elements . current = { }
167
168
} , 100 )
168
169
169
170
const getMetadataNode = useCallback ( ( nameBuffer : any , path : string ) => {
170
171
elements . current [ path ] = nameBuffer
171
- getMetadataDebounced ( )
172
- } , [ ] )
172
+ getMetadataDebounced ( commonFilterType )
173
+ } , [ commonFilterType ] )
173
174
174
175
// This helper function constructs the object that will be sent back at the step
175
176
// [2] during the treeWalker function work. Except for the mandatory `data`
You can’t perform that action at this time.
0 commit comments