Skip to content

Commit a99880b

Browse files
committed
[Doc] Fix Jekyll build
1 parent d5c68e9 commit a99880b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/DataTable.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,17 +408,21 @@ To render data differently in a column, you can pass a custom `<DataTable.Col fi
408408

409409
If you need to pass props to the custom field, use the `<DataTable.Col children>` instead:
410410

411+
{% raw %}
411412
```tsx
412413
<DataTable.Col source="amount" align="right">
413414
<NumberField source="amount" options={{ style: 'currency', currency: 'USD' }} />
414415
</DataTable.Col>
415416
```
417+
{% endraw %}
416418

417419
**Tip**: Rendering numeric values in a table is such a common need that react-admin provides `<DataTable.NumberCol>` just for that:
418420

421+
{% raw %}
419422
```tsx
420423
<DataTable.NumberCol source="amount" options={{ style: 'currency', currency: 'USD' }} />
421424
```
425+
{% endraw %}
422426

423427
`<NumberField>` is a Field component: it reads the record (via `useRecordContext`) and renders a value. React-admin includes many Field components that you can use as `field` or `children` of `<DataTable.Col>` ([`<TextField>`](./TextField.md), [`<NumberField>`](./NumberField.md), [`<DateField>`](./DateField.md), [`<ReferenceField>`](./ReferenceField.md), and many more). Check [the Fields documentation](./Fields.md) for more information.
424428

0 commit comments

Comments
 (0)