Make select automatically selecting one item when there is only one configurable
This commit is contained in:
parent
5bb573100b
commit
3a3bf2addb
@ -66,7 +66,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
@isset($options)
|
@isset($options)
|
||||||
@if($options->count() === 1)
|
@if(($autoselect ?? FALSE) && $options->count() === 1)
|
||||||
$('#{{ $id ?? $name }}')
|
$('#{{ $id ?? $name }}')
|
||||||
.val('{{ $options->first()['id'] }}')
|
.val('{{ $options->first()['id'] }}')
|
||||||
.trigger("change")
|
.trigger("change")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user