Skip to content

Commit

Permalink
Merge pull request #197 from hotwired/revert-169-omarluq/turbo-stream…
Browse files Browse the repository at this point in the history
…-morph-action-docs

Revert "add docs for turbo stream morph action"
  • Loading branch information
brunoprietog authored Jul 13, 2024
2 parents 35c9c80 + 8a7b5d2 commit bf1bb14
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
16 changes: 0 additions & 16 deletions _source/handbook/05_streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,6 @@ A Turbo Streams message is a fragment of HTML consisting of `<turbo-stream>` ele
</template>
</turbo-stream>

<turbo-stream action="morph" target="current_step">
<template>
<!-- The contents of this template will replace the
element with ID "current_step" via morph. -->
<li>New item</li>
</template>
</turbo-stream>

<turbo-stream action="morph" target="current_step" children-only>
<template>
<!-- The contents of this template will replace the
children of the element with ID "current_step" via morph. -->
<li>New item</li>
</template>
</turbo-stream>

<turbo-stream action="refresh" request-id="abcd-1234"></turbo-stream>
```

Expand Down
22 changes: 0 additions & 22 deletions _source/reference/streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,6 @@ Inserts the content within the template tag after the element designated by the
</turbo-stream>
```

### Morph

Replaces the element designated by the target dom id via morph.

```html
<turbo-stream action="morph" target="dom_id">
<template>
Content to replace the element.
</template>
</turbo-stream>
```

The `children-only` attribute can be added to the `turbo-stream` element to morph only the children of the element designated by the target dom id.

```html
<turbo-stream action="morph" target="dom_id" children-only>
<template>
Content to replace the element.
</template>
</turbo-stream>
```

### Refresh

Initiates a [Page Refresh](/handbook/page_refreshes) to render new content with
Expand Down

0 comments on commit bf1bb14

Please sign in to comment.