|
11 | 11 | $validationClass = !empty($getValidationClass($errors, $locale)) ? $getValidationClass($errors, $locale) : '';
|
12 | 12 | $isWired = $componentIsWired();
|
13 | 13 | $wiredKey = !empty($getNestedWireKey()) ? $getNestedWireKey().'.'.$name : $name;
|
| 14 | + $wiredModel = $isWired && ! $hasComponentNativeLivewireModelBinding() ? ($locale ? $wiredKey . '.' . $locale : $wiredKey) : null; |
14 | 15 | @endphp
|
15 | 16 |
|
16 | 17 | {{-- Hidden phone input --}}
|
17 | 18 | <input
|
18 |
| - type="hidden" {{ $attributes->wire('model') }} id="{{ $id }}" name="{{ $name }}" |
| 19 | + type="hidden" |
| 20 | + {{ $attributes->except('wire')->merge([ |
| 21 | + 'wire:model' => $wiredModel, |
| 22 | + ]) }} |
| 23 | + |
| 24 | + id="{{ $id }}" name="{{ $name }}" |
19 | 25 | @if ($attributes->has('value'))
|
20 | 26 | value="{{ $attributes->get('value') }}"
|
21 | 27 | @endif
|
|
39 | 45 | <div class="{{$validationClass}} wire-validation ">
|
40 | 46 | <span wire:ignore>
|
41 | 47 | <input {{ $attributes->except('wire')->merge([
|
42 |
| - 'wire:model' . $getComponentLivewireModifier() => $isWired && ! $hasComponentNativeLivewireModelBinding() ? ($locale ? $wiredKey . '.' . $locale : $wiredKey) : null, |
43 |
| - 'id' => $id, |
44 |
| - 'class' => ' iti--laraphone form-control ' .$validationClass. ' ' . $attributes->get('class'), |
45 |
| - 'type' => $type, |
46 |
| - 'name' => $isWired ? null : ($locale ? $name . '[' . $locale . ']' : $name), |
47 |
| - 'placeholder' => $placeholder, |
48 |
| - 'data-locale' => $locale, |
49 |
| - 'value' => $isWired ? null : ($value ?? ''), |
50 |
| - 'aria-describedby' => $caption ? $id . '-caption' : null, |
| 48 | + 'wire:model' => $wiredModel, |
| 49 | + 'id' => $id, |
| 50 | + 'class' => ' iti--laraphone form-control ' .$validationClass. ' ' . $attributes->get('class'), |
| 51 | + 'type' => $type, |
| 52 | + 'name' => $isWired ? null : ($locale ? $name . '[' . $locale . ']' : $name), |
| 53 | + 'placeholder' => $placeholder, |
| 54 | + 'data-locale' => $locale, |
| 55 | + 'value' => $isWired ? null : ($value ?? ''), |
| 56 | + 'aria-describedby' => $caption ? $id . '-caption' : null, |
51 | 57 | ]) }}
|
52 | 58 |
|
53 | 59 | data-phone-input-id="{{ $id }}"
|
|
0 commit comments