Skip to content

Commit

Permalink
[Live] Adding an example of a norender model with a button to trigger…
Browse files Browse the repository at this point in the history
… the render
  • Loading branch information
weaverryan committed Mar 1, 2024
1 parent 2ddc47b commit 67a0daf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/LiveComponent/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,13 @@ it won't, yet, make an Ajax call to re-render the component. Whenever
the next re-render *does* happen, the updated ``max`` value will be
used.

This can be useful along with a button that triggers a render on click:

.. code-block:: html+twig

<input data-model="norender|coupon">
<button data-action="live#$render">Apply</button>

.. _name-attribute-model:

Using name="" instead of data-model
Expand Down

0 comments on commit 67a0daf

Please sign in to comment.