Skip to content

Commit 4340c81

Browse files
committed
minor #2046 Update naming of stimulus controller on default attributes - index.rst (DennisdeBest)
This PR was merged into the 2.x branch. Discussion ---------- Update naming of stimulus controller on default attributes - index.rst To add a custom stimulus controller to the root component element the name can not contain `-controller`. If using `some_custom_controller.js`, the name should be `some-custom` I had some issues with that and figured it out on this github issue : #687 (comment) | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | License | MIT Commits ------- 03abf65 Update index.rst
2 parents 0c24231 + 03abf65 commit 4340c81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ To add a custom Stimulus controller to your root component element:
880880

881881
.. code-block:: html+twig
882882

883-
<div {{ attributes.defaults(stimulus_controller('my-controller', { someValue: 'foo' })) }}>
883+
<div {{ attributes.defaults(stimulus_controller('some-custom', { someValue: 'foo' })) }}>
884884

885885
JavaScript Component Hooks
886886
~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)