- Notifications
You must be signed in to change notification settings - Fork905
fix: get presets working correctly with dynamic params#17923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
mostly looks good, just had one concern. approving since it's a small thing so that you don't have to wait for me to re-review.
site/src/modules/workspaces/DynamicParameter/DynamicParameter.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
return null; | ||
}).filter( | ||
(update): update is NonNullable<typeof update> => update !== null, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
you could useflatMap
here instead ofmap
andfilter
. just return[]
or[x]
instead ofnull
andx
. then we don't need the fancy annotations.
but even that's a bit "clever" for my taste. imho, ideally we'd leave it as afor
loop and just have someresult
array that wepush
to when desired.
dc21016
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This adds a few fixes to get presets working correctly with dynamic params