File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,7 @@ export const
58
58
const
59
59
defaultVal = m . value || null ,
60
60
parsedVal = defaultVal ? parseDate ( defaultVal ) : null ,
61
- [ value , setValue ] = React . useState < Date | undefined > ( ( ) => {
62
- return parsedVal ? new Date ( parsedVal ) : undefined
63
- } ) ,
61
+ [ value , setValue ] = React . useState < Date | undefined > ( parsedVal ? new Date ( parsedVal ) : undefined ) ,
64
62
onSelectDate = ( d : Date | null | undefined ) => {
65
63
const val = ( d === null || d === undefined ) ? defaultVal : formatDate ( d )
66
64
wave . args [ m . name ] = val
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export const
195
195
components = items . map ( ( m : any , i ) => {
196
196
const
197
197
// All form items are wrapped by their component name (first and only prop of "m").
198
- componentKey = Object . keys ( m ) [ 0 ] ,
198
+ [ componentKey ] = Object . keys ( m ) ,
199
199
{ name, visible = true } = m [ componentKey ] ,
200
200
visibleStyles : React . CSSProperties = visible ? { } : { display : 'none' }
201
201
You can’t perform that action at this time.
0 commit comments