File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class="cursor-pointer hover:underline"
5757 label =" Username"
5858 type =" text"
5959 wire:model =" username"
60- x-on:input =" usernameInput"
60+ x-on:input =" $js. usernameInput"
6161 />
6262
6363 <x-input-text
@@ -164,9 +164,11 @@ class="xs:max-w-30 ml-auto w-full text-xs/3"
164164 </x-form >
165165 </div >
166166
167- <script lang =" js" >
168- const usernameInput = (event ) => {
169- event .target .value = event .target .value .replaceAll (/ [^ a-zA-Z0-9 _] / g , " _" ).toLowerCase ()
170- }
171- </script >
167+ @script
168+ <script lang =" js" >
169+ $js .usernameInput = (event ) => {
170+ event .target .value = event .target .value .replaceAll (/ [^ a-zA-Z0-9 _] / g , " _" ).toLowerCase ()
171+ }
172+ </script >
173+ @endscript
172174</x-contents >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class="size-24 rounded-full"
2929 label =" Username"
3030 type =" text"
3131 wire:model =" username"
32- x-on:input =" usernameInput"
32+ x-on:input =" $js. usernameInput"
3333 />
3434
3535 <x-input-text
@@ -142,9 +142,11 @@ class="xs:max-w-30 ml-auto w-full text-xs/3"
142142 </x-button >
143143 </div >
144144
145- <script lang =" js" >
146- const usernameInput = (event ) => {
147- event .target .value = event .target .value .replaceAll (/ [^ a-zA-Z0-9 _] / g , " _" ).toLowerCase ()
148- }
149- </script >
145+ @script
146+ <script lang =" js" >
147+ $js .usernameInput = (event ) => {
148+ event .target .value = event .target .value .replaceAll (/ [^ a-zA-Z0-9 _] / g , " _" ).toLowerCase ()
149+ }
150+ </script >
151+ @endscript
150152</x-contents >
You can’t perform that action at this time.
0 commit comments