@@ -176,7 +176,7 @@ The `useForm` hook returns an object with the following properties:
176
176
rows = { [
177
177
[
178
178
{
179
- value: ` <strong><code> fields</code></strong> ` ,
179
+ value: " **` fields`** " ,
180
180
},
181
181
{
182
182
value: " Deprecated. This property cannot be relied on as up-to-date." ,
@@ -187,7 +187,7 @@ The `useForm` hook returns an object with the following properties:
187
187
],
188
188
[
189
189
{
190
- value: ` <strong><code> submit</code></strong> ` ,
190
+ value: " **` submit`** " ,
191
191
},
192
192
{
193
193
value: " Method to trigger the form to submit" ,
@@ -198,7 +198,7 @@ The `useForm` hook returns an object with the following properties:
198
198
],
199
199
[
200
200
{
201
- value: ` <strong><code> dispatchFields</code></strong> ` ,
201
+ value: " **` dispatchFields`** " ,
202
202
},
203
203
{
204
204
value: " Dispatch actions to the form field state" ,
@@ -209,7 +209,7 @@ The `useForm` hook returns an object with the following properties:
209
209
],
210
210
[
211
211
{
212
- value: ` <strong><code> validateForm</code></strong> ` ,
212
+ value: " **` validateForm`** " ,
213
213
},
214
214
{
215
215
value: " Trigger a validation of the form state" ,
@@ -220,18 +220,18 @@ The `useForm` hook returns an object with the following properties:
220
220
],
221
221
[
222
222
{
223
- value: ` <strong><code> createFormData</code></strong> ` ,
223
+ value: " **` createFormData`** " ,
224
224
},
225
225
{
226
- value: ` <> Create a <code> multipart/form-data</code> object from the current form's state</> ` ,
226
+ value: " Create a ` multipart/form-data` object from the current form's state" ,
227
227
},
228
228
{
229
229
value: ' '
230
230
}
231
231
],
232
232
[
233
233
{
234
- value: ` <strong><code> disabled</code></strong> ` ,
234
+ value: " **` disabled`** " ,
235
235
},
236
236
{
237
237
value: " Boolean denoting whether or not the form is disabled" ,
@@ -242,7 +242,7 @@ The `useForm` hook returns an object with the following properties:
242
242
],
243
243
[
244
244
{
245
- value: ` <strong><code> getFields</code></strong> ` ,
245
+ value: " **` getFields`** " ,
246
246
},
247
247
{
248
248
value: ' Gets all fields from state' ,
@@ -253,7 +253,7 @@ The `useForm` hook returns an object with the following properties:
253
253
],
254
254
[
255
255
{
256
- value: ` <strong><code> getField</code></strong> ` ,
256
+ value: " **` getField`** " ,
257
257
},
258
258
{
259
259
value: ' Gets a single field from state by path' ,
@@ -264,7 +264,7 @@ The `useForm` hook returns an object with the following properties:
264
264
],
265
265
[
266
266
{
267
- value: ` <strong><code> getData</code></strong> ` ,
267
+ value: " **` getData`** " ,
268
268
},
269
269
{
270
270
value: ' Returns the data stored in the form' ,
@@ -275,7 +275,7 @@ The `useForm` hook returns an object with the following properties:
275
275
],
276
276
[
277
277
{
278
- value: ` <strong><code> getSiblingData</code></strong> ` ,
278
+ value: " **` getSiblingData`** " ,
279
279
},
280
280
{
281
281
value: ' Returns form sibling data for the given field path' ,
@@ -286,40 +286,40 @@ The `useForm` hook returns an object with the following properties:
286
286
],
287
287
[
288
288
{
289
- value: ` <strong><code> setModified</code></strong> ` ,
289
+ value: " **` setModified`** " ,
290
290
},
291
291
{
292
- value: ` <> Set the form\' s <code> modified</code> state</> ` ,
292
+ value: " Set the form\' s ` modified` state" ,
293
293
},
294
294
{
295
295
value: ' ' ,
296
296
},
297
297
],
298
298
[
299
299
{
300
- value: ` <strong><code> setProcessing</code></strong> ` ,
300
+ value: " **` setProcessing`** " ,
301
301
},
302
302
{
303
- value: ` <> Set the form\' s <code> processing</code> state</> ` ,
303
+ value: " Set the form\' s ` processing` state" ,
304
304
},
305
305
{
306
306
value: ' ' ,
307
307
},
308
308
],
309
309
[
310
310
{
311
- value: ` <strong><code> setSubmitted</code></strong> ` ,
311
+ value: " **` setSubmitted`** " ,
312
312
},
313
313
{
314
- value: ` <> Set the form\' s <code> submitted</code> state</> ` ,
314
+ value: " Set the form\' s ` submitted` state" ,
315
315
},
316
316
{
317
317
value: ' ' ,
318
318
},
319
319
],
320
320
[
321
321
{
322
- value: ` <strong><code> formRef</code></strong> ` ,
322
+ value: " **` formRef`** " ,
323
323
},
324
324
{
325
325
value: ' The ref from the form HTML element' ,
@@ -330,7 +330,7 @@ The `useForm` hook returns an object with the following properties:
330
330
],
331
331
[
332
332
{
333
- value: ` <strong><code> reset</code></strong> ` ,
333
+ value: " **` reset`** " ,
334
334
},
335
335
{
336
336
value: ' Method to reset the form to its initial state' ,
@@ -341,7 +341,7 @@ The `useForm` hook returns an object with the following properties:
341
341
],
342
342
[
343
343
{
344
- value: ` <strong><code> addFieldRow</code></strong> ` ,
344
+ value: " **` addFieldRow`** " ,
345
345
},
346
346
{
347
347
value: " Method to add a row on an array or block field" ,
@@ -351,7 +351,6 @@ The `useForm` hook returns an object with the following properties:
351
351
drawerDescription: ' A useful method to programmatically add a row to an array or block field.' ,
352
352
drawerSlug: ' addFieldRow' ,
353
353
drawerContent: `
354
- <>
355
354
<TableWithDrawers
356
355
columns={[
357
356
'Prop',
@@ -360,23 +359,23 @@ The `useForm` hook returns an object with the following properties:
360
359
rows={[
361
360
[
362
361
{
363
- value: <strong><code> path</code></strong> ,
362
+ value: "** \` path\` **" ,
364
363
},
365
364
{
366
365
value: "The path to the array or block field",
367
366
},
368
367
],
369
368
[
370
369
{
371
- value: <strong><code> rowIndex</code></strong> ,
370
+ value: "** \` rowIndex\` **" ,
372
371
},
373
372
{
374
373
value: "The index of the row to add. If omitted, the row will be added to the end of the array.",
375
374
},
376
375
],
377
376
[
378
377
{
379
- value: <strong><code> data</code></strong> ,
378
+ value: "** \` data<\` **" ,
380
379
},
381
380
{
382
381
value: "The data to add to the row",
@@ -385,13 +384,8 @@ The `useForm` hook returns an object with the following properties:
385
384
]}
386
385
/>
387
386
388
- {' '}
389
387
390
- <br />
391
-
392
- {' '}
393
-
394
- <pre>
388
+ \`\`\` tsx
395
389
{\` import { useForm } from "payload/components/forms";
396
390
397
391
export const CustomArrayManager = () => {
@@ -416,10 +410,11 @@ export const CustomArrayManager = () => {
416
410
</button>
417
411
)
418
412
}\` }
419
- </pre>
413
+ \`\`\`
414
+
415
+ An example config to go along with the Custom Component
420
416
421
- <p>An example config to go along with the Custom Component</p>
422
- <pre>
417
+ \`\`\` tsx
423
418
{\` const ExampleCollection = {
424
419
slug: "example-collection",
425
420
fields: [
@@ -444,14 +439,13 @@ export const CustomArrayManager = () => {
444
439
},
445
440
],
446
441
}\` }
447
- </pre>
448
- </>
449
- `
442
+ \`\`\`
443
+ `
450
444
}
451
445
],
452
446
[
453
447
{
454
- value: ` <strong><code> removeFieldRow</code></strong> ` ,
448
+ value: " **` removeFieldRow`** " ,
455
449
},
456
450
{
457
451
value: " Method to remove a row from an array or block field" ,
@@ -461,7 +455,6 @@ export const CustomArrayManager = () => {
461
455
drawerDescription: ' A useful method to programmatically remove a row from an array or block field.' ,
462
456
drawerSlug: ' removeFieldRow' ,
463
457
drawerContent: `
464
- <>
465
458
<TableWithDrawers
466
459
columns={[
467
460
'Prop',
@@ -470,15 +463,15 @@ export const CustomArrayManager = () => {
470
463
rows={[
471
464
[
472
465
{
473
- value: <strong><code> path</code></strong> ,
466
+ value: "** \` path\` **" ,
474
467
},
475
468
{
476
469
value: "The path to the array or block field",
477
470
},
478
471
],
479
472
[
480
473
{
481
- value: <strong><code> rowIndex</code></strong> ,
474
+ value: "** \` rowIndex\` **" ,
482
475
},
483
476
{
484
477
value: "The index of the row to remove",
@@ -487,13 +480,9 @@ export const CustomArrayManager = () => {
487
480
]}
488
481
/>
489
482
490
- {' '}
491
483
492
- <br />
493
484
494
- {' '}
495
-
496
- <pre>
485
+ \`\`\` tsx
497
486
{\` import { useForm } from "payload/components/forms";
498
487
499
488
export const CustomArrayManager = () => {
@@ -513,10 +502,11 @@ export const CustomArrayManager = () => {
513
502
</button>
514
503
)
515
504
}\` }
516
- </pre>
505
+ \`\`\`
506
+
507
+ An example config to go along with the Custom Component
517
508
518
- <p>An example config to go along with the Custom Component</p>
519
- <pre>
509
+ \`\`\` tsx
520
510
{\` const ExampleCollection = {
521
511
slug: "example-collection",
522
512
fields: [
@@ -541,14 +531,13 @@ export const CustomArrayManager = () => {
541
531
},
542
532
],
543
533
}\` }
544
- </pre>
545
- </>
546
- `
534
+ \`\`\`
535
+ `
547
536
}
548
537
],
549
538
[
550
539
{
551
- value: ` <strong><code> replaceFieldRow</code></strong> ` ,
540
+ value: " **` replaceFieldRow`** " ,
552
541
},
553
542
{
554
543
value: " Method to replace a row from an array or block field" ,
@@ -558,7 +547,6 @@ export const CustomArrayManager = () => {
558
547
drawerDescription: ' A useful method to programmatically replace a row from an array or block field.' ,
559
548
drawerSlug: ' replaceFieldRow' ,
560
549
drawerContent: `
561
- <>
562
550
<TableWithDrawers
563
551
columns={[
564
552
'Prop',
@@ -567,23 +555,23 @@ export const CustomArrayManager = () => {
567
555
rows={[
568
556
[
569
557
{
570
- value: <strong><code> path</code></strong> ,
558
+ value: "** \` path\` **" ,
571
559
},
572
560
{
573
561
value: "The path to the array or block field",
574
562
},
575
563
],
576
564
[
577
565
{
578
- value: <strong><code> rowIndex</code></strong> ,
566
+ value: "** \` rowIndex\` **" ,
579
567
},
580
568
{
581
569
value: "The index of the row to replace",
582
570
},
583
571
],
584
572
[
585
573
{
586
- value: <strong><code> data</code></strong> ,
574
+ value: "** \` data\` **" ,
587
575
},
588
576
{
589
577
value: "The data to replace within the row",
@@ -592,13 +580,10 @@ export const CustomArrayManager = () => {
592
580
]}
593
581
/>
594
582
595
- {' '}
596
583
597
- <br />
598
584
599
- {' '}
600
585
601
- <pre>
586
+ \`\`\` tsx
602
587
{\` import { useForm } from "payload/components/forms";
603
588
604
589
export const CustomArrayManager = () => {
@@ -623,10 +608,11 @@ export const CustomArrayManager = () => {
623
608
</button>
624
609
)
625
610
}\` }
626
- </pre>
611
+ \`\`\`
612
+
613
+ An example config to go along with the Custom Component
627
614
628
- <p>An example config to go along with the Custom Component</p>
629
- <pre>
615
+ \`\`\` tsx
630
616
{\` const ExampleCollection = {
631
617
slug: "example-collection",
632
618
fields: [
@@ -651,8 +637,7 @@ export const CustomArrayManager = () => {
651
637
},
652
638
],
653
639
}\` }
654
- </pre>
655
- </>
640
+ \`\`\`
656
641
`
657
642
}
658
643
],
0 commit comments