Laravel live wire accordion collapsing on input change

Viewed 1470

I am using accordion something like this https://www.tailwindtoolbox.com/components/accordion and I have a input field inside my accordion

<div class="tab-content overflow-y-scroll border-l-2 bg-gray-100 border-indigo-500 leading-normal">
     <div  class="border border-black mt-3 p-3 grid grid-cols-4">
          <div class="col-span-1">
                <label  for="about" class="block text-sm leading-5 font-medium text-gray-700">
                     Title
                </label>
         <div class="rounded-md shadow-sm">
        <textarea wire:model="additional_docs.title" name="additional_docs" id="edit_additional_docs" name="" rows="3" class="form-textarea mt-1 block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5" placeholder="description"></textarea>
         </div>
         <p class="mt-2 text-sm text-gray-500">
             Document Title
         </p>
    </div>
</div>

The accordion is working fine but as soon as I start typing the accordion closes and I need to open accordion again and start typing, but if I remove wire:model ,it works fine .I am new to live wire and if I use wire:ignore it doesn't help too.

Thanks for any help :)

1 Answers

Add wire:ignore.self on the element which will be hidden/shown.

Related