Skip to content

Commit

Permalink
Merge pull request #35 from ariaieboy/debounce
Browse files Browse the repository at this point in the history
add debounce and onBlur support
  • Loading branch information
ariaieboy authored Jun 1, 2024
2 parents da2b8a1 + 9691f09 commit 57cb5e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resources/views/currency-mask.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
$id = $getId();
$isConcealed = $isConcealed();
$isDisabled = $isDisabled();
$isLive = $isLive();
$isLiveOnBlur = $isLiveOnBlur();
$isLiveDebounced = $isLiveDebounced();
$liveDebounce = $getLiveDebounce();
$isPrefixInline = $isPrefixInline();
$isSuffixInline = $isSuffixInline();
$mask = $getMask();
Expand All @@ -15,6 +19,7 @@
$suffixLabel = $getSuffixLabel();
$statePath = $getStatePath();
$xmask = "\$money(\$input,'$decimalSeparator','$thousandSeparator',$precision)";
$xmodel = "x-model".($isLive?($isLiveOnBlur?".lazy":($isLiveDebounced?(".debounce.".$liveDebounce."ms"):"")):"");
$xdata = <<<JS
{
input:\$wire.{$applyStateBindingModifiers("\$entangle('{$statePath}')")},
Expand Down Expand Up @@ -80,7 +85,7 @@ class="fi-fo-text-input"
'step' => $getStep(),
'type' => 'text',
'x-data' => $xdata,
'x-model'=>'masked',
$xmodel =>'masked',
'x-mask:dynamic' => $xmask
], escape: false)
"
Expand Down

0 comments on commit 57cb5e9

Please sign in to comment.