Skip to content

Commit

Permalink
fix: unkeyed show argument (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
atk authored Oct 16, 2024
1 parent 890dafa commit 603a367
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routes/reference/components/show.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The Show control flow is used to conditional render part of the view: it renders
import { Show } from "solid-js"
import type { JSX } from "solid-js"

function Show<T>(props: {
function Show<T, K>(props: {
when: T | undefined | null | false
keyed: boolean
fallback?: JSX.Element
children: JSX.Element | ((item: T) => JSX.Element)
children: JSX.Element | ((item: T | Accessor<T>) => JSX.Element)
}): () => JSX.Element
```

Expand All @@ -33,6 +33,8 @@ Show can also be used as a way of keying blocks to a specific data model. For ex
</Show>
```

If the `keyed` property is not used, the argument of a child function will be an accessor containing the item.

## Props

| Name | Type | Description |
Expand Down

0 comments on commit 603a367

Please sign in to comment.