@@ -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: ` <strong><code>fields</code></strong> ` ,
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: ` <strong><code>submit</code></strong> ` ,
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: ` <strong><code>dispatchFields</code></strong> ` ,
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: ` <strong><code>validateForm</code></strong> ` ,
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: ` <strong><code>createFormData</code></strong> ` ,
224
224
},
225
225
{
226
- value: <>Create a <code >multipart/form-data</code > object from the current form's state</>,
226
+ value: ` <>Create a <code>multipart/form-data</code> 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: ` <strong><code>disabled</code></strong> ` ,
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: ` <strong><code>getFields</code></strong> ` ,
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: ` <strong><code>getField</code></strong> ` ,
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: ` <strong><code>getData</code></strong> ` ,
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: ` <strong><code>getSiblingData</code></strong> ` ,
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: ` <strong><code>setModified</code></strong> ` ,
290
290
},
291
291
{
292
- value: <>Set the form\'s <code >modified</code > state</>,
292
+ value: ` <>Set the form\' s <code>modified</code> 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: ` <strong><code>setProcessing</code></strong> ` ,
301
301
},
302
302
{
303
- value: <>Set the form\'s <code >processing</code > state</>,
303
+ value: ` <>Set the form\' s <code>processing</code> 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: ` <strong><code>setSubmitted</code></strong> ` ,
312
312
},
313
313
{
314
- value: <>Set the form\'s <code >submitted</code > state</>,
314
+ value: ` <>Set the form\' s <code>submitted</code> 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: ` <strong><code>formRef</code></strong> ` ,
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: ` <strong><code>reset</code></strong> ` ,
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: ` <strong><code>addFieldRow</code></strong> ` ,
345
345
},
346
346
{
347
347
value: " Method to add a row on an array or block field" ,
@@ -350,7 +350,7 @@ The `useForm` hook returns an object with the following properties:
350
350
drawerTitle: ' addFieldRow' ,
351
351
drawerDescription: ' A useful method to programmatically add a row to an array or block field.' ,
352
352
drawerSlug: ' addFieldRow' ,
353
- drawerContent : (
353
+ drawerContent: `
354
354
<>
355
355
<TableWithDrawers
356
356
columns={[
@@ -392,7 +392,7 @@ The `useForm` hook returns an object with the following properties:
392
392
{' '}
393
393
394
394
<pre>
395
- { ` import { useForm } from "payload/components/forms";
395
+ {\ ` import { useForm } from "payload/components/forms";
396
396
397
397
export const CustomArrayManager = () => {
398
398
const { addFieldRow } = useForm()
@@ -415,12 +415,12 @@ export const CustomArrayManager = () => {
415
415
Add Row
416
416
</button>
417
417
)
418
- } ` }
418
+ }\ ` }
419
419
</pre>
420
420
421
421
<p>An example config to go along with the Custom Component</p>
422
422
<pre>
423
- { ` const ExampleCollection = {
423
+ {\ ` const ExampleCollection = {
424
424
slug: "example-collection",
425
425
fields: [
426
426
{
@@ -443,15 +443,15 @@ export const CustomArrayManager = () => {
443
443
},
444
444
},
445
445
],
446
- } ` }
446
+ }\ ` }
447
447
</pre>
448
448
</>
449
- )
449
+ `
450
450
}
451
451
],
452
452
[
453
453
{
454
- value: <strong ><code >removeFieldRow</code ></strong >,
454
+ value: ` <strong><code>removeFieldRow</code></strong> ` ,
455
455
},
456
456
{
457
457
value: " Method to remove a row from an array or block field" ,
@@ -460,7 +460,7 @@ export const CustomArrayManager = () => {
460
460
drawerTitle: ' removeFieldRow' ,
461
461
drawerDescription: ' A useful method to programmatically remove a row from an array or block field.' ,
462
462
drawerSlug: ' removeFieldRow' ,
463
- drawerContent : (
463
+ drawerContent: `
464
464
<>
465
465
<TableWithDrawers
466
466
columns={[
@@ -494,7 +494,7 @@ export const CustomArrayManager = () => {
494
494
{' '}
495
495
496
496
<pre>
497
- { ` import { useForm } from "payload/components/forms";
497
+ {\ ` import { useForm } from "payload/components/forms";
498
498
499
499
export const CustomArrayManager = () => {
500
500
const { removeFieldRow } = useForm()
@@ -512,12 +512,12 @@ export const CustomArrayManager = () => {
512
512
Remove Row
513
513
</button>
514
514
)
515
- } ` }
515
+ }\ ` }
516
516
</pre>
517
517
518
518
<p>An example config to go along with the Custom Component</p>
519
519
<pre>
520
- { ` const ExampleCollection = {
520
+ {\ ` const ExampleCollection = {
521
521
slug: "example-collection",
522
522
fields: [
523
523
{
@@ -540,15 +540,15 @@ export const CustomArrayManager = () => {
540
540
},
541
541
},
542
542
],
543
- } ` }
543
+ }\ ` }
544
544
</pre>
545
545
</>
546
- )
546
+ `
547
547
}
548
548
],
549
549
[
550
550
{
551
- value: <strong ><code >replaceFieldRow</code ></strong >,
551
+ value: ` <strong><code>replaceFieldRow</code></strong> ` ,
552
552
},
553
553
{
554
554
value: " Method to replace a row from an array or block field" ,
@@ -557,7 +557,7 @@ export const CustomArrayManager = () => {
557
557
drawerTitle: ' replaceFieldRow' ,
558
558
drawerDescription: ' A useful method to programmatically replace a row from an array or block field.' ,
559
559
drawerSlug: ' replaceFieldRow' ,
560
- drawerContent : (
560
+ drawerContent: `
561
561
<>
562
562
<TableWithDrawers
563
563
columns={[
@@ -599,7 +599,7 @@ export const CustomArrayManager = () => {
599
599
{' '}
600
600
601
601
<pre>
602
- { ` import { useForm } from "payload/components/forms";
602
+ {\ ` import { useForm } from "payload/components/forms";
603
603
604
604
export const CustomArrayManager = () => {
605
605
const { replaceFieldRow } = useForm()
@@ -622,12 +622,12 @@ export const CustomArrayManager = () => {
622
622
Replace Row
623
623
</button>
624
624
)
625
- } ` }
625
+ }\ ` }
626
626
</pre>
627
627
628
628
<p>An example config to go along with the Custom Component</p>
629
629
<pre>
630
- { ` const ExampleCollection = {
630
+ {\ ` const ExampleCollection = {
631
631
slug: "example-collection",
632
632
fields: [
633
633
{
@@ -650,10 +650,10 @@ export const CustomArrayManager = () => {
650
650
},
651
651
},
652
652
],
653
- } ` }
653
+ }\ ` }
654
654
</pre>
655
655
</>
656
- )
656
+ `
657
657
}
658
658
],
659
659
]}
0 commit comments