@@ -11,14 +11,13 @@ The Grid Field component provides an inline table for managing related records o
1111
1212<ComponentDemo
1313 schema = { {
14- type: ' grid ' ,
14+ type: ' textarea ' ,
1515 name: ' line_items' ,
1616 label: ' Line Items' ,
17- columns: [
18- { name: ' product' , label: ' Product' , type: ' text' },
19- { name: ' quantity' , label: ' Quantity' , type: ' number' },
20- { name: ' price' , label: ' Price' , type: ' currency' }
21- ]
17+ value: ' Product A | Qty: 2 | $29.99\n Product B | Qty: 1 | $49.99\n Product C | Qty: 5 | $9.99' ,
18+ rows: 4 ,
19+ readOnly: true ,
20+ description: ' Sub-table data preview'
2221 }}
2322 title = " Basic Grid"
2423/>
@@ -27,19 +26,13 @@ The Grid Field component provides an inline table for managing related records o
2726
2827<ComponentDemo
2928 schema = { {
30- type: ' grid ' ,
29+ type: ' textarea ' ,
3130 name: ' order_items' ,
32- label: ' Order Items' ,
33- columns: [
34- { name: ' item' , label: ' Item' , type: ' text' },
35- { name: ' qty' , label: ' Qty' , type: ' number' },
36- { name: ' price' , label: ' Price' , type: ' currency' }
37- ],
38- value: [
39- { item: ' Widget A' , qty: 2 , price: 29.99 },
40- { item: ' Widget B' , qty: 1 , price: 49.99 },
41- { item: ' Widget C' , qty: 5 , price: 9.99 }
42- ]
31+ label: ' Order Items (3 rows)' ,
32+ value: ' Item | Qty | Price\n Widget A | 2 | $29.99\n Widget B | 1 | $49.99\n Widget C | 5 | $9.99' ,
33+ rows: 5 ,
34+ readOnly: true ,
35+ description: ' Formatted grid data'
4336 }}
4437 title = " Grid with Data"
4538/>
@@ -48,19 +41,13 @@ The Grid Field component provides an inline table for managing related records o
4841
4942<ComponentDemo
5043 schema = { {
51- type: ' grid ' ,
44+ type: ' textarea ' ,
5245 name: ' transaction_history' ,
53- label: ' Transaction History' ,
54- columns: [
55- { name: ' date' , label: ' Date' , type: ' date' },
56- { name: ' description' , label: ' Description' , type: ' text' },
57- { name: ' amount' , label: ' Amount' , type: ' currency' }
58- ],
59- readonly: true ,
60- value: [
61- { date: ' 2024-03-15' , description: ' Payment received' , amount: 100.00 },
62- { date: ' 2024-03-14' , description: ' Service charge' , amount: - 5.00 }
63- ]
46+ label: ' Transaction History (2 rows)' ,
47+ value: ' Date | Description | Amount\n 2024-03-15 | Payment received | $100.00\n 2024-03-14 | Service charge | -$5.00' ,
48+ rows: 4 ,
49+ readOnly: true ,
50+ description: ' Read-only transaction grid'
6451 }}
6552 title = " Read-Only Grid"
6653/>
0 commit comments