Skip to content

Commit

Permalink
Merge pull request #5861 from pat270/LPD-33885
Browse files Browse the repository at this point in the history
docs(clayui.com): LPD-33885 clarify difference betweek defaultItems a…
  • Loading branch information
matuzalemsteles authored Aug 17, 2024
2 parents 0af0404 + 5ac90af commit 1cc56f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/clay-core/docs/table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Static content is when the `<Table />` options do not change during the lifecycl

### Dynamic

Unlike static content, dynamic content is when the options can change during the lifecycle of the application or when the data comes from a service. Dynamic content rendering is data agnostic, this allows you to configure how to render the component options regardless of the chosen data structure.
Unlike static content, dynamic content is when the options can change during the lifecycle of the application or when the data comes from a service. Dynamic content rendering is data agnostic, this allows you to configure how to render the component options regardless of the chosen data structure. For more information about controlled and uncontrolled components, visit [this blog post](/blog/2022/05/02/api-consistency-improvements-for-controlled-and-uncontrolled-components.html).

```jsx
<Table>
Expand All @@ -93,10 +93,13 @@ Unlike static content, dynamic content is when the options can change during the
</Head>

<Body
defaultItems={[
items={[
{id: 1, name: 'Games', type: 'File folder'},
{id: 2, name: 'Program Files', type: 'File folder'},
]}
onItemsChange={() => {
// do something
}}
>
{(row) => (
<Row>
Expand Down

0 comments on commit 1cc56f1

Please sign in to comment.