{{-- Always-open scrolling checkbox list backed by an AJAX selectlist endpoint. Behavior lives in the .js-select2-checkboxes-scrollbox init in snipeit.js. Styling in overrides.less under the same name. Submits as a single hidden input containing a comma-separated list of selected ids, sidestepping max_input_vars for very large selections. The server reads with explode(',', $request->input($name)). Props: name : hidden input name and form field. label : control label shown above the scrolling box. endpoint : selectlist endpoint slug (users, companies, ...). selected : array of pre-selected ids (optional). height : max-height of the scrolling box in px (default 400). maxSelectAll : optional per-widget ceiling for ?all=1 (clamped by MAX_UNPAGINATED). help_text : optional help text under the control. --}} @props([ 'name', 'label', 'endpoint', 'selected' => [], 'height' => 400, 'maxSelectAll' => null, 'help_text' => null, 'compactSubmit' => false, ]) @php $listId = $name.'_checkbox_list'; $selectedIds = collect($selected ?? [])->filter()->values(); $selectedCsv = $selectedIds->implode(','); $selectedCount = $selectedIds->count(); @endphp