Skip to content

Commit

Permalink
Merge pull request #6 from ariaieboy/5-bug-error-casting-int-column-d…
Browse files Browse the repository at this point in the history
…atabase

fix nullable input
  • Loading branch information
ariaieboy authored Oct 14, 2023
2 parents ca6fabd + c768f03 commit 378742a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/currency-mask.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
input:\$wire.{$applyStateBindingModifiers("\$entangle('{$statePath}')")},
masked:'',
init(){
this.masked = this.input.replaceAll('.','$decimalSeparator');
this.masked = this.input?.replaceAll('.','$decimalSeparator');
\$watch('masked',()=>this.updateInput());
},
updateInput(){
this.input = this.masked.replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.');
this.input = this.masked?.replaceAll('$thousandSeparator','').replaceAll('$decimalSeparator','.');
}
}
JS;
Expand Down

0 comments on commit 378742a

Please sign in to comment.