@php $datalistOptions = $getDatalistOptions(); $extraAlpineAttributes = $getExtraAlpineAttributes(); $id = $getId(); $isConcealed = $isConcealed(); $isDisabled = $isDisabled(); $isPrefixInline = $isPrefixInline(); $isSuffixInline = $isSuffixInline(); $mask = $getMask(); $prefixActions = $getPrefixActions(); $prefixIcon = $getPrefixIcon(); $prefixLabel = $getPrefixLabel(); $suffixActions = $getSuffixActions(); $suffixIcon = $getSuffixIcon(); $suffixLabel = $getSuffixLabel(); $statePath = $getStatePath(); $xmask = "\$money(\$input,'$decimalSeparator','$thousandSeparator',$precision)"; $xdata = <<this.updateMasked()); \$el.addEventListener('input',(event)=>this.updateInput()); \$el.addEventListener('blur',(event)=>this.updateInput()); }, updateMasked(){ if(typeof this.input === 'number'){ \$el.value = this.input?.toString().replaceAll('.','$decimalSeparator'); \$el.dispatchEvent(new Event('input')); } }, updateInput(){ this.input = \$el.value?.replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.'); } } JS; @endphp @if ($datalistOptions) @foreach ($datalistOptions as $option) @endif