@props([
'subjects',
'title' => '',
'input_name' => '',
'placeholder' => '',
'id_field' => 'subject_id',
'code_field' => 'code',
'bordered' => true,
'level' => null,
'allSelectable' => false,
])
merge(['class' => 'selfSelectBoxContainer relative flex-1 w-full']) }} x-data="{
isSelectBoxOpen: false,
updateSelection(name, code, id) {
selectedName = name;
selectedCode = code;
selectedId = id;
this.isSelectBoxOpen = false;
}
}"
@click.outside="if (!$event.target.closest('.selfSelectBox')) isSelectBoxOpen = false">
{{ __('Title name') }}
{{ __('Header code') }}
@foreach ($subjects as $subject)
@include('components.subject-select-box-item', [
'subject' => $subject,
'level' => $level,
'allSelectable' => $allSelectable,
])
@endforeach
@pushOnce('scripts')
@endPushOnce