File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const SeriesTitleCell = ({
1515 filterName = { "series" }
1616 filterValue = { row . id }
1717 // tooltipText={"EVENTS.SERIES.TABLE.TOOLTIP.SERIES"} // Disabled due to performance concerns
18+ resetBeforeRedirect
1819 >
1920 { row . title }
2021 </ RedirectCell >
Original file line number Diff line number Diff line change 11import { useNavigate } from "react-router" ;
2- import { setSpecificEventFilter } from "../../slices/tableFilterSlice" ;
2+ import { setSpecificEventFilter , resetFilterValues } from "../../slices/tableFilterSlice" ;
33import { useAppDispatch } from "../../store" ;
44import ButtonLikeAnchor from "./ButtonLikeAnchor" ;
55import { ParseKeys } from "i18next" ;
@@ -14,17 +14,22 @@ const RedirectCell = ({
1414 filterValue,
1515 tooltipText,
1616 children,
17+ resetBeforeRedirect = false ,
1718} : {
1819 path : string
1920 filterName : string
2021 filterValue : string
2122 tooltipText ?: ParseKeys
2223 children : ReactNode
24+ resetBeforeRedirect ?: boolean ;
2325} ) => {
2426 const dispatch = useAppDispatch ( ) ;
2527 const navigate = useNavigate ( ) ;
2628
2729 const redirectToResource = async ( filterValue : string ) => {
30+ if ( resetBeforeRedirect ) {
31+ dispatch ( resetFilterValues ( ) ) ;
32+ }
2833 // Set filter before redirecting
2934 await dispatch ( setSpecificEventFilter ( { filter : filterName , filterValue } ) ) ;
3035 navigate ( path ) ;
You can’t perform that action at this time.
0 commit comments