@@ -12,7 +12,7 @@ import dynamic from 'next/dynamic';
12
12
13
13
import MapperContext from '@docs/components/mappers-context' ;
14
14
const CodeEditor = dynamic ( import ( '@docs/components/code-editor' ) , {
15
- ssr : false
15
+ ssr : false ,
16
16
} ) ;
17
17
18
18
const baseStructure = {
@@ -22,11 +22,11 @@ const baseStructure = {
22
22
{
23
23
title : 'Tab 1' ,
24
24
description : 'Text boxes and text areas' ,
25
- key : '553' ,
25
+ name : '553' ,
26
26
fields : [
27
27
{
28
28
title : 'Text boxes' ,
29
- key : '637' ,
29
+ name : '637' ,
30
30
fields : [
31
31
{
32
32
name : 'switch_1' ,
@@ -115,7 +115,7 @@ const baseStructure = {
115
115
} ,
116
116
{
117
117
title : 'Text areas' ,
118
- key : '638' ,
118
+ name : '638' ,
119
119
fields : [
120
120
{
121
121
name : 'textarea_box_1' ,
@@ -132,11 +132,11 @@ const baseStructure = {
132
132
{
133
133
title : 'Tab 2' ,
134
134
description : 'Checks' ,
135
- key : '554' ,
135
+ name : '554' ,
136
136
fields : [
137
137
{
138
138
title : 'Check boxes' ,
139
- key : '639' ,
139
+ name : '639' ,
140
140
fields : [
141
141
{
142
142
name : 'check_box_1' ,
@@ -155,7 +155,7 @@ const baseStructure = {
155
155
} ,
156
156
{
157
157
title : 'Radios' ,
158
- key : '640' ,
158
+ name : '640' ,
159
159
fields : [
160
160
{
161
161
name : 'radio_button_1' ,
@@ -229,11 +229,11 @@ const baseStructure = {
229
229
{
230
230
title : 'Tab 3' ,
231
231
description : '' ,
232
- key : '555' ,
232
+ name : '555' ,
233
233
fields : [
234
234
{
235
235
title : 'Dropdowns' ,
236
- key : '641' ,
236
+ name : '641' ,
237
237
fields : [
238
238
{
239
239
name : 'dropdown_list_1' ,
@@ -345,11 +345,11 @@ const baseStructure = {
345
345
{
346
346
title : 'Tab 4' ,
347
347
description : '' ,
348
- key : '556' ,
348
+ name : '556' ,
349
349
fields : [
350
350
{
351
351
title : 'Datepickers' ,
352
- key : '642' ,
352
+ name : '642' ,
353
353
fields : [
354
354
{
355
355
name : 'date_control_1' ,
@@ -368,7 +368,7 @@ const baseStructure = {
368
368
} ,
369
369
{
370
370
title : 'Timepickers' ,
371
- key : '643' ,
371
+ name : '643' ,
372
372
fields : [
373
373
{
374
374
name : 'date_time_control_1' ,
@@ -391,11 +391,11 @@ const baseStructure = {
391
391
{
392
392
title : 'Mixed' ,
393
393
description : '' ,
394
- key : '558' ,
394
+ name : '558' ,
395
395
fields : [
396
396
{
397
397
title : 'New Section' ,
398
- key : '645' ,
398
+ name : '645' ,
399
399
fields : [
400
400
{
401
401
name : 'text_box_10' ,
@@ -481,7 +481,7 @@ const baseStructure = {
481
481
} ,
482
482
] ,
483
483
component : components . TABS ,
484
- key : '57' ,
484
+ name : '57' ,
485
485
} ,
486
486
] ,
487
487
} ;
@@ -504,7 +504,7 @@ const LiveEditor = () => {
504
504
}
505
505
506
506
try {
507
- defaultSchemaValidator ( schema , formFieldsMapper , layoutMapper ) ;
507
+ defaultSchemaValidator ( schema , mappers . mappers . pf4 . formFieldsMapper , mappers . mappers . pf4 . layoutMapper ) ;
508
508
setState ( state => ( { ...state , parsedSchema : schema } ) ) ;
509
509
} catch ( error ) {
510
510
console . warn ( 'not correct json schema' , error ) ;
@@ -519,17 +519,18 @@ const LiveEditor = () => {
519
519
>
520
520
< Grid
521
521
item
522
- xs = { 6 }
522
+ md = { 6 }
523
+ xs = { 12 }
523
524
>
524
525
< div style = { { width : '100%' , paddingTop : 10 , background : '#1d1f21' } } >
525
526
< CodeEditor
526
527
readOnly = { false }
527
528
mode = "json"
528
529
onChange = { onChange }
529
530
value = { value }
531
+ maxLines = { 50 }
530
532
/>
531
533
</ div >
532
-
533
534
< div >
534
535
< Grid container spacing = { 6 } >
535
536
< Grid item xs = { 12 } md = { 6 } >
@@ -554,7 +555,8 @@ const LiveEditor = () => {
554
555
</ Grid >
555
556
< Grid
556
557
item
557
- xs = { 6 }
558
+ md = { 6 }
559
+ xs = { 12 }
558
560
>
559
561
< Paper square style = { { padding : 16 , paddingLeft : 24 } } >
560
562
< Grid container spacing = { 6 } >
0 commit comments