Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(clayui.com): LPD-33885 clarify difference betweek defaultItems a… #5861

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading