Skip to content

Commit d8869bd

Browse files
committed
Fix #10: Value for choice input was not being set
1 parent 7089f33 commit d8869bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/form.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ export function FormRadioInput({label, help_text, error, value, options, ...prop
7070

7171

7272
export function FormSelectInput({label, help_text, error, value, options, ...props}) {
73+
console.log("********", options, value)
7374
return (
7475
<div>
7576
{label && <label>{label}</label>}
76-
<select defaultValue="" {...props}>
77+
<select value={value || ''} {...props}>
7778
<option disabled value="" key={'__placehlder'}>Select...</option>
7879
{options.map((option, i) => {
79-
let label, inputValue;
80+
let label, inputValue, selected;
8081
if (typeof option === 'object') {
8182
label = option.label;
8283
inputValue = option.value;

0 commit comments

Comments
 (0)