hterik commented on PR #34887: URL: https://github.com/apache/airflow/pull/34887#issuecomment-1833492307
Rebased now. I see the problem with base date now. The whole base date selector and the filter options stop working if a `dag_run_id` was present in the URL (though `dag_run_id` in url didn't work at all before so questionable if this is a regression). I did a quick and dirty attempt of fixing it but couldn't find a good solution in short time. Something like below did make both the selector and Clear filters button work. Except if one clicks the current date, because when base date is not present it assumes it is the same time. It feels like i'm slowly migrating essentially the whole useFilters and useSelection to the Main function, it's a bit out of my comfort zone to be making such big changes here. I also don't have much time to look deeper into this in the close future. If you feel like you have better control over this i would happy to hand it over. ``` const Main = () => { const [searchParams, setSearchParams] = useSearchParams(); const [firstRunIdSetByUrl, setFirstRunIdSetByUrl] = useState(searchParams.get(RUN_ID)); const [prevBasedate, setPrevBasedate] = useState(searchParams.get(BASE_DATE_PARAM)); const baseDate = searchParams.get(BASE_DATE_PARAM); if (baseDate != prevBasedate) { setPrevBasedate(baseDate) setFirstRunIdSetByUrl(null) searchParams.delete("dag_run_id") searchParams.delete("task_id") setSearchParams(searchParams); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org