Viewing file: 5a87543bb7e86619b63738a7a873b869.php (3.74 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div> <div class="select-wrapper mx-0 flex flex-col sm:grid sm:grid-cols-3 mt-2 w-100" style="gap:8px;"> <div class="px-0 w-full mb-2"> <select id="city" name="country" wire:model="selectedCountryId" class="select location city tc-input opacity-0"> <option value=""><?php echo e(__('select_country')); ?></option> <?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($country['name']); ?>"><?php echo e($country['name']); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="px-0 w-full mb-2"> <select name="state" id="state" wire:model="selectedStateId" class="select location zone tc-input opacity-0"> <option value=""><?php echo e(__('select_state')); ?></option> <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($state['name']); ?>"><?php echo e($state['name']); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="px-0 w-full mb-2"> <select name="district" id="district" wire:model="selectedCityId" class="select location area tc-input opacity-0"> <option value=""><?php echo e(__('select_city')); ?></option> <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($city['name']); ?>"><?php echo e($city['name']); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <style> .location+.bigdrop, .location+.select2-container { width: 100% !important; }
@media (max-width: 1199px) { .location+.select2-container { margin: 4px 0px; } }
.location+.select2-container .select2-selection--single, .location+.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px !important; }
.location+.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 44px !important; } </style>
<?php $__env->startPush('js'); ?> <?php echo \Livewire\Livewire::scripts(); ?>
<script> $(document).ready(function() { $('.select').select2(); }); window.addEventListener('render-select2', event => { $('.select').select2(); }) </script> <script> $(".location.city").on('change', function(e) { let id = $(this).val() window.livewire.find('<?php echo e($_instance->id); ?>').set('selectedCountryId', id); livewire.emit('getStateByCountryId'); })
$(".location.zone").on('change', function(e) { let id = $(this).val() window.livewire.find('<?php echo e($_instance->id); ?>').set('selectedStateId', id); livewire.emit('getCityByStateId', id); })
$(".location.area").on('change', function(e) { let id = $(this).val() window.livewire.find('<?php echo e($_instance->id); ?>').set('selectedCityId', id); }) </script> <?php $__env->stopPush(); ?> </div><?php /**PATH E:\add listing 8-9-25\addListing\resources\views/livewire/country-state-city.blade.php ENDPATH**/ ?>
|