File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/pf3-component-mapper Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ import Switch from "../src/form-fields/switch-field";
12
12
13
13
class App extends React . Component {
14
14
render ( ) {
15
+ const initialValues = {
16
+ date_control_1 : new Date ( )
17
+ }
15
18
return (
16
19
< div >
17
20
< h1 > Pf3 component mapper</ h1 >
18
21
< Grid >
19
22
< Row >
20
23
< FormRenderer
24
+ initialValues = { initialValues }
21
25
onSubmit = { console . log }
22
26
schemaType = "default"
23
27
formFieldsMapper = { formFieldsMapper }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ const selectComponent = ({
66
66
checked = { input . value }
67
67
onChange = { ( { target : { checked } } ) => input . onChange ( checked ) }
68
68
/> ,
69
- [ componentTypes . DATE_PICKER ] : ( ) => < DateTimePicker onChange = { input . onChange } isDisabled = { isDisabled } { ...rest } /> ,
69
+ [ componentTypes . DATE_PICKER ] : ( ) => < DateTimePicker onChange = { input . onChange } value = { input . value } isDisabled = { isDisabled } { ...rest } /> ,
70
70
} ) [ componentType ] ;
71
71
72
72
const renderHelperText = ( error , description ) => ( error // eslint-disable-line no-nested-ternary
You can’t perform that action at this time.
0 commit comments