CheckboxList bulkToggleable is not working
I have these CheckboxList line of code
but the bulkToggleable is not working properly.
when i click select all, it doesnt work,
the same with unselect all.
where did i do wrong?
CheckboxList::make('setoran_id')->dehydrated(false)->label('Data Setoran')
->columnSpanFull()->hidden(fn ($get) => $get('pilih_semua') == true)
->options(function ($get, $livewire) {
$type = ($livewire->ownerRecord->type == 'Pemasukan')
? ["CR", "Pindah Buku"] : ["DB"];
$options = array();
if ($get('periode_awal') && $get('periode_akhir')) {
$setoran = Setoran::whereDate('tanggal', '>=', $get('periode_awal'))
->whereDate('tanggal', '<', $get('periode_akhir'))
->whereIn('type', $type)->where('sudah_dibukukan', 0)
->where('rekening_id', $get('rekening_id'))->get();
foreach ($setoran as $value) {
$options[$value->id] = $value->id . ' - '
. number_format($value->dana) . ' - '
. $value->keterangan;
}
if ($setoran->count()) {
return $options;
} else $options = ([0 => 'Tidak ada data transaksi']);
}
})->columns(2)->bulkToggleable()CheckboxList::make('setoran_id')->dehydrated(false)->label('Data Setoran')
->columnSpanFull()->hidden(fn ($get) => $get('pilih_semua') == true)
->options(function ($get, $livewire) {
$type = ($livewire->ownerRecord->type == 'Pemasukan')
? ["CR", "Pindah Buku"] : ["DB"];
$options = array();
if ($get('periode_awal') && $get('periode_akhir')) {
$setoran = Setoran::whereDate('tanggal', '>=', $get('periode_awal'))
->whereDate('tanggal', '<', $get('periode_akhir'))
->whereIn('type', $type)->where('sudah_dibukukan', 0)
->where('rekening_id', $get('rekening_id'))->get();
foreach ($setoran as $value) {
$options[$value->id] = $value->id . ' - '
. number_format($value->dana) . ' - '
. $value->keterangan;
}
if ($setoran->count()) {
return $options;
} else $options = ([0 => 'Tidak ada data transaksi']);
}
})->columns(2)->bulkToggleable()but the bulkToggleable is not working properly.
when i click select all, it doesnt work,
the same with unselect all.
where did i do wrong?