Skip to content

Commit 0854bb1

Browse files
committed
fix: update parameter values
1 parent 4415619 commit 0854bb1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/client/App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ export const App = () => {
145145
return isEqual(currentParameterOmitValue, existingParameterOmitValue);
146146
});
147147

148-
return existing ?? p;
148+
if (existing) {
149+
existing.value = p.value;
150+
return existing;
151+
}
152+
return p;
149153
});
150154
});
151155
}, [output]);

src/client/Preview.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ const TableDrawer: FC<TableDrawerProps> = ({
733733

734734
type ViewOutputProps = {
735735
parameters: ParameterWithSource[];
736+
// parameterValues: Record<string, string>;
736737
};
737738
const ViewOutput: FC<ViewOutputProps> = ({ parameters }) => {
738739
const [isOpen, setIsOpen] = useState(() => false);

src/client/snippets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const switchInput = `data "coder_parameter" "switch" {
9191
description = "The next parameter can be on or off"
9292
type = "bool"
9393
form_type = "switch"
94-
defalt = true
94+
default = true
9595
order = 1
9696
}`
9797

0 commit comments

Comments
 (0)