@php $datalistOptions = $getDatalistOptions(); $extraAlpineAttributes = $getExtraAlpineAttributes(); $hasInlineLabel = $hasInlineLabel(); $id = $getId(); $isConcealed = $isConcealed(); $isDisabled = $isDisabled(); $isPasswordRevealable = $isPasswordRevealable(); $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)"; $xmodel = "x-model".($isLive()?($isLiveOnBlur()?".lazy":($isLiveDebounced()?(".debounce.".$getLiveDebounce()."ms"):"")):""); $xdata = <<this.updateInput(value,oldValue)); \$watch('input', () => this.updateMasked()); }, updateMasked(){ if(this.input !== undefined && typeof Number(this.input) === 'number') { if(this.masked?.toString().replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.') !== this.input){ this.masked = this.input?.toString().replaceAll('.','$decimalSeparator'); } } }, updateInput(value, oldValue){ if(value?.toString().replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.') !== oldValue?.toString().replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.')){ this.input = this.masked?.toString().replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.'); } } } JS; @endphp $hasInlineLabel, ]) > {{ $getLabel() }} @if ($datalistOptions) @foreach ($datalistOptions as $option) @endif