@@ -40,6 +40,7 @@ export interface HeaderCol {
4040export interface TableProps {
4141 headerCols : HeaderCol [ ] ;
4242 tableRows : any [ ] ;
43+ activeSortingDirection ?: any ;
4344 activeSorting ?: any ;
4445 paginated ?: any ;
4546 filters ?: any [ ] ;
@@ -58,6 +59,7 @@ export const Table: React.FC<TableProps> = ({
5859 tableRows,
5960 paginated,
6061 activeSorting,
62+ activeSortingDirection,
6163 filters,
6264 showHeader = true ,
6365 pagination = true ,
@@ -183,7 +185,7 @@ export const Table: React.FC<TableProps> = ({
183185 componentName === 'components'
184186 ? locationPath . pathname . split ( '/' ) [ 5 ]
185187 : locationPath . pathname . split ( '/' ) [ 4 ] ;
186- // console.log(check, '333') ;
188+ const checkForLocationPath = locationPath . pathname . split ( '/' ) [ 4 ] ;
187189 useEffect ( ( ) => {
188190 // console.log(locationPath.pathname.split('/')[4], 'locationPath1');
189191 setItemPerPage ( itemPerPage ) ;
@@ -263,7 +265,12 @@ export const Table: React.FC<TableProps> = ({
263265 }
264266
265267 // eslint-disable-next-line react-hooks/exhaustive-deps
266- } , [ locationPath . pathname . split ( '/' ) [ 4 ] , isValidFilter , activeSorting ] ) ;
268+ } , [
269+ checkForLocationPath ,
270+ isValidFilter ,
271+ activeSorting ,
272+ activeSortingDirection ,
273+ ] ) ;
267274 let rowsToDisplay = tableRows ;
268275 // function getFetchedState(state: any) {
269276 // setFetchingMembers(state);
0 commit comments