Update DataTable.md

This commit is contained in:
Angelos Chalaris
2018-11-29 11:42:43 +02:00
committed by GitHub
parent a74d7277a0
commit a3ac0855af

View File

@ -1,6 +1,6 @@
### DataTable ### DataTable
Renders a table with rows dynamically created from an array of data. Renders a table with rows dynamically created from an array of primitives.
Render a `<table>` element with two columns (`ID` and `Value`). Render a `<table>` element with two columns (`ID` and `Value`).
Use `Array.prototype.map` to render every item in `data` as a `<tr>` element, consisting of its index and value, give it a `key` produced from the concatenation of the two. Use `Array.prototype.map` to render every item in `data` as a `<tr>` element, consisting of its index and value, give it a `key` produced from the concatenation of the two.