File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export const NetflowTab: React.FC<PageComponentProps> = ({ obj }) => {
4343 const initState = React . useRef < Array < 'initDone' | 'configLoading' | 'configLoaded' | 'forcedFiltersLoaded' > > ( [ ] ) ;
4444 const [ config , setConfig ] = React . useState < Config > ( defaultConfig ) ;
4545 const [ forcedFilters , setForcedFilters ] = React . useState < Filters | null > ( null ) ;
46- const previous = usePrevious ( { obj, state : initState . current } ) ;
46+ const previous = usePrevious ( { obj } ) ;
4747
4848 React . useEffect ( ( ) => {
4949 // init function will be triggered only once
@@ -67,8 +67,9 @@ export const NetflowTab: React.FC<PageComponentProps> = ({ obj }) => {
6767 const filterDefinitions = getFilterDefinitions ( config . filters , config . columns , t ) ;
6868
6969 if (
70+ ! initState . current . includes ( 'configLoaded' ) ||
7071 _ . isEmpty ( filterDefinitions ) ||
71- ( previous ?. state . includes ( 'configLoaded ' ) &&
72+ ( initState . current . includes ( 'forcedFiltersLoaded ' ) &&
7273 obj ?. kind === previous ?. obj ?. kind &&
7374 obj ?. metadata ?. name === previous ?. obj ?. metadata ?. name &&
7475 obj ?. metadata ?. namespace === previous ?. obj ?. metadata ?. namespace )
You can’t perform that action at this time.
0 commit comments