Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
- revert to old style with `newParameters` variable
  - it feels more readable than what `prettier` wants πŸ˜…

- my editor was apparently lagging quite heavily in showing this in my previous commit (I only saw it when I re-opened the file), seemed like a stale lint cache or something

Signed-off-by: Anton Gilgur <[email protected]>
  • Loading branch information
Anton Gilgur committed Jun 25, 2024
1 parent bafb556 commit e373bef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/src/app/shared/components/parameters-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ interface ParametersInputProps {

export function ParametersInput(props: ParametersInputProps) {
function onParameterChange(parameter: Parameter, value: string) {
props.onChange(props.parameters.map(p => ({
const newParameters: Parameter[] = props.parameters.map(p => ({
...p,
value: p.name === parameter.name ? value : Utils.getValueFromParameter(p),
})));
value: p.name === parameter.name ? value : Utils.getValueFromParameter(p)
}));
props.onChange(newParameters);
}

function displaySelectFieldForEnumValues(parameter: Parameter) {
Expand Down

0 comments on commit e373bef

Please sign in to comment.