Have you tried to add wire:ignore anywhere ?
Difficulty with using wire:key and wire:click
I made a group of radio buttons that when clicked show a table on a different part of my page. What's strange is that every time I click on the radio button, the entire top table disappears. The bottom table is changed. I read up on using wire:key, but wire:key does not listen for a click event.
Here is my top table, which after clicking on the radio button, the entire table except for the header dissapears:
<tbody>
<div wire:model="product" name="product">
@foreach ($products as $product)
<tr>
<td>
<input type="radio" name="displayBtn" wire:click="display({{ $product->id }})" />
</td>
<td class="p-2 border-b border-l text-left" value="{{ $product->id }}">{{ $product->Date }}</td>
<td class="p-2 border-b border-l text-left" value="{{ $product->id }}">{{ $product->FLA }}</td>
<td class="p-2 border-b border-l text-left" value="{{ $product->id }}">{{ $product->Location_Name }}</td>
<td class="p-2 border-b border-l text-left" value="{{ $product->id }}">{{ $product->Max_Students }}</td>
</tr>
@endforeach
</div>
</tbody>```
Here is my bottom table, which changes successfully after clicking on the radio button:
```<div>
<div x-show="show">
<!-- SECOND TABLE -->
<h1>Table 2</h1>
<table>
<thead>
<tr>
<th class="font-bold py-2 px-4 border-b border-l text-left">Name</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Company</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Sign-Up-date</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Fee</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Status</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Inv #</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Email</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Phone</th>
<th class="font-bold py-2 px-4 border-b border-l text-left">Test?</th>
</tr>
</thead>
<tbody>
<div>
@foreach ($sizes as $size)
<tr>
<td class="p-2 border-b border-l text-left" value="{{ $size->id }}">{{ $size->Student_First_Name }} {{ $size->Student_Last_Name }}</td>
<td class="p-2 border-b border-l text-left"></td>
<td class="p-2 border-b border-l text-left"></td>
<td class="p-2 border-b border-l text-left"></td>
<td class="p-2 border-b border-l text-left"></td>
<td class="p-2 border-b border-l text-left"></td>
<td class="p-2 border-b border-l text-left"></td>
<td class="p-2 border-b border-l text-left">{{ $size->Phone }}</td>
<td class="p-2 border-b border-l text-left">{{ $size->Email }}</td>
<td class="p-2 border-b border-l text-left"></td>
</tr>
@endforeach
</div>
</tbody>
</table>
</div>
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">Print Cities</button>
</div>```
@vincent15000 I think I know what my problem is.
Earlier on, I was able to successfully create a 3 level dropdown with a simpler, more intuitive database. I literally copied and pasted all the code except for the queries into the current project I am working on.
Here is MY take:
In my simpler database, all of the dropdowns were related to each other, whose values were dependent on each other For example Query1->Query2->Query3
The other example I have has multiple connections across different tables, with many of the tables not relating to each other. I believe this issue is a query error and nothing to do withsomuch as a logical error on livewire's part. I am going to try and update my query to make sure that all of the connections are in straight path, instead of sprawling all over the place.
Please or to participate in this conversation.