1
1
import React , { useEffect , useState } from 'react' ;
2
2
import { useSelector } from 'react-redux' ;
3
3
import { CheckContainerModel , CheckResultsOverviewDataModel } from '../../api' ;
4
- import Button from " ../../components/Button" ;
4
+ import Button from ' ../../components/Button' ;
5
5
import DataQualityChecks from '../../components/DataQualityChecks' ;
6
6
import SvgIcon from '../../components/SvgIcon' ;
7
7
import { useActionDispatch } from '../../hooks/useActionDispatch' ;
8
8
import {
9
9
getTableProfilingChecksModelFilter ,
10
10
setTableUpdatedProfilingChecksModelFilter
11
11
} from '../../redux/actions/table.actions' ;
12
- import { getFirstLevelActiveTab , getFirstLevelState } from "../../redux/selectors" ;
13
- import { CheckResultOverviewApi , TableApiClient } from "../../services/apiClient" ;
14
- import { CheckTypes } from "../../shared/routes" ;
12
+ import {
13
+ getFirstLevelActiveTab ,
14
+ getFirstLevelState
15
+ } from '../../redux/selectors' ;
16
+ import {
17
+ CheckResultOverviewApi ,
18
+ TableApiClient
19
+ } from '../../services/apiClient' ;
20
+ import { CheckTypes } from '../../shared/routes' ;
15
21
import { useDecodedParams } from '../../utils' ;
16
22
17
23
const TableProfilingChecksUIFilterView = ( ) => {
18
- const { checkTypes, connection : connectionName , schema : schemaName , table : tableName , category, checkName } : { checkTypes : CheckTypes , connection : string , schema : string , table : string , category : string , checkName : string } = useDecodedParams ( ) ;
19
- const { checksUIFilter, isUpdatedChecksUIFilter, loading } = useSelector ( getFirstLevelState ( checkTypes ) ) ;
24
+ const {
25
+ checkTypes,
26
+ connection : connectionName ,
27
+ schema : schemaName ,
28
+ table : tableName ,
29
+ category,
30
+ checkName
31
+ } : {
32
+ checkTypes : CheckTypes ;
33
+ connection : string ;
34
+ schema : string ;
35
+ table : string ;
36
+ category : string ;
37
+ checkName : string ;
38
+ } = useDecodedParams ( ) ;
39
+ const { checksUIFilter, isUpdatedChecksUIFilter, loading } = useSelector (
40
+ getFirstLevelState ( checkTypes )
41
+ ) ;
20
42
const dispatch = useActionDispatch ( ) ;
21
43
const [ checkResultsOverview , setCheckResultsOverview ] = useState <
22
44
CheckResultsOverviewDataModel [ ]
23
45
> ( [ ] ) ;
24
46
const [ isUpdating , setIsUpdating ] = useState ( false ) ;
25
47
const firstLevelActiveTab = useSelector ( getFirstLevelActiveTab ( checkTypes ) ) ;
26
-
48
+ console . log ( firstLevelActiveTab ) ;
27
49
const getCheckOverview = ( ) => {
28
50
CheckResultOverviewApi . getTableProfilingChecksOverview (
29
51
connectionName ,
@@ -37,6 +59,7 @@ const TableProfilingChecksUIFilterView = () => {
37
59
} ;
38
60
39
61
useEffect ( ( ) => {
62
+ console . log ( connectionName , schemaName , tableName , category , checkName ) ;
40
63
dispatch (
41
64
getTableProfilingChecksModelFilter (
42
65
checkTypes ,
@@ -48,7 +71,14 @@ const TableProfilingChecksUIFilterView = () => {
48
71
checkName
49
72
)
50
73
) ;
51
- } , [ connectionName , schemaName , tableName , category , checkName ] ) ;
74
+ } , [
75
+ connectionName ,
76
+ schemaName ,
77
+ tableName ,
78
+ category ,
79
+ checkName ,
80
+ firstLevelActiveTab
81
+ ] ) ;
52
82
53
83
const onUpdate = async ( ) => {
54
84
setIsUpdating ( true ) ;
@@ -82,7 +112,7 @@ const TableProfilingChecksUIFilterView = () => {
82
112
)
83
113
) ;
84
114
} ;
85
-
115
+ console . log ( checksUIFilter ) ;
86
116
return (
87
117
< >
88
118
< div className = "flex justify-between px-4 py-2 border-b border-gray-300 mb-2 min-h-14" >
0 commit comments