Skip to content

Commit

Permalink
Using unique js method
Browse files Browse the repository at this point in the history
  • Loading branch information
muath-ye committed Aug 3, 2022
1 parent 41e9269 commit cd6bdc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/components/forms/string-input.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<input
onchange="stringInputUpdated(this)"
onchange="{{ str_replace('[]', '', $name) }}_stringInputUpdated(this)"
name="{{ $name }}"
{{ !isset($type) ?'': "type=$type" }}
{{ !isset($class) ?'': "class=$class" }}
Expand All @@ -9,7 +9,7 @@
/>

<script>
function stringInputUpdated(element) {
function {{ str_replace('[]', '', $name) }}_stringInputUpdated(element) {
let inputIndex = "{{ str_replace('[]', '', $name) }}";
let rules = "{{ $rules }}"
let data = {
Expand Down

0 comments on commit cd6bdc9

Please sign in to comment.