Make select automatically selecting one item when there is only one configurable

This commit is contained in:
Deon George 2025-04-05 15:05:48 +11:00
parent 5bb573100b
commit 3a3bf2addb

View File

@ -66,7 +66,7 @@
@endif
@isset($options)
@if($options->count() === 1)
@if(($autoselect ?? FALSE) && $options->count() === 1)
$('#{{ $id ?? $name }}')
.val('{{ $options->first()['id'] }}')
.trigger("change")