Skip to content

Commit 8118153

Browse files
Fix report builder flashing on every column toggle
Remove redundant dispatch('refreshTable') from updatedSelectedColumns() since Livewire already re-renders when the property changes. Increase checkbox debounce from default 150ms to 500ms so rapid toggles are batched into fewer requests. Closes #101 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bb232f0 commit 8118153

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

resources/views/report-editor.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class="m-4 block p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-g
1313
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6">
1414
@foreach($columns as $columnKey => $column)
1515
<div class="flex items-center mb-4">
16-
<input wire:model.live.debounce="selectedColumns" id="{{$column['key']}}" type="checkbox"
16+
<input wire:model.live.debounce.500ms="selectedColumns" id="{{$column['key']}}" type="checkbox"
1717
value="{{ $column['key'] }}"
1818
class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
1919
<label for="{{$column['key']}}"

src/Support/Concerns/WithReportBuilder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ private function findElementByKey(array $array, $targetValue): ?array
4646
public function updatedSelectedColumns(): void
4747
{
4848
$this->resetPage();
49-
$this->dispatch('refreshTable')->self();
5049
}
5150

5251
public function availableColumns(): array

0 commit comments

Comments
 (0)