pierrejeambrun commented on code in PR #23678:
URL: https://github.com/apache/airflow/pull/23678#discussion_r873196265
##########
airflow/www/static/js/grid/utils/useFilters.js:
##########
@@ -44,14 +44,11 @@ const useFilters = () => {
// it is not send to the api for filtering.
const taskState = searchParams.get(TASK_STATE_PARAM);
- const makeOnChangeFn = (paramName, formatFn) => (e) => {
- let { value } = e.target;
- if (formatFn) {
- value = formatFn(value);
- }
+ const makeOnChangeFn = (paramName, formatFn) => (value) => {
Review Comment:
:+1:
I agree, I just did that because we already had the useFilters and it was a
conveniant way to pass around this state without having a dedicated Context.
(Without pushing this to the url rerendering are not triggered which is the
expected behavior)
Fixed. For now I prop drilled a state from the `Main` component, to share
this between the `LegendRow` and the `TaskInstances` components.
I didn't want to create a context just for 1 state, but I can change that if
preferable.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]