Skip to content

Commit 1847c71

Browse files
committed
Fix #50: Provide a fileinput widget
1 parent 3d45422 commit 1847c71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ui.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ function FormField(props) {
7676
InputField = FormDateTimeInput;
7777
}
7878
inputProps.type = props.schema.format;
79-
}
80-
else {
79+
} else {
8180
inputProps.type = 'text';
8281
}
8382

@@ -88,6 +87,11 @@ function FormField(props) {
8887
inputProps.maxlength = props.schema.maxLength;
8988

9089
break;
90+
case 'fileinput':
91+
InputField = FormFileInput;
92+
if (props.schema.format)
93+
inputProps.type = props.schema.format;
94+
break;
9195
case 'range':
9296
case 'integer':
9397
inputProps.step = '1';

0 commit comments

Comments
 (0)