Skip to content

Commit b31ffc3

Browse files
authored
Merge pull request #27 from lara-zeus/filament-4
Filament 4
2 parents e29bb26 + 5d6a991 commit b31ffc3

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
],
2929
"require": {
3030
"php": "^8.1",
31-
"filament/filament": "^3.0",
31+
"filament/filament": "^4.0",
3232
"spatie/laravel-package-tools": "^1.16"
3333
},
3434
"require-dev": {

resources/views/quantity.blade.php

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
increment() {
5959
if(! this.isDisabled && this.state < this.maxValue && this.state >= this.minValue){
6060
this.state = parseInt(this.state) + this.steps
61-
$wire.$refresh()
61+
62+
setTimeout(() => {
63+
$wire.$refresh();
64+
}, 1000);
65+
6266
if(this.state == this.maxValue){
6367
this.isIncrementAllowed = false
6468
} else {
@@ -82,18 +86,18 @@
8286
}"
8387
>
8488
<x-filament::input.wrapper
85-
:disabled="$isDisabled"
86-
:inline-prefix="$isPrefixInline"
87-
:inline-suffix="$isSuffixInline"
88-
:prefix="$prefixLabel"
89-
:prefix-actions="$prefixActions"
90-
:prefix-icon="$prefixIcon"
91-
:prefix-icon-color="$getPrefixIconColor()"
92-
:suffix="$suffixLabel"
93-
:suffix-actions="$suffixActions"
94-
:suffix-icon="$suffixIcon"
95-
:suffix-icon-color="$getSuffixIconColor()"
96-
:valid="! $errors->has($getStatePath)"
89+
:disabled="$isDisabled"
90+
:inline-prefix="$isPrefixInline"
91+
:inline-suffix="$isSuffixInline"
92+
:prefix="$prefixLabel"
93+
:prefix-actions="$prefixActions"
94+
:prefix-icon="$prefixIcon"
95+
:prefix-icon-color="$getPrefixIconColor()"
96+
:suffix="$suffixLabel"
97+
:suffix-actions="$suffixActions"
98+
:suffix-icon="$suffixIcon"
99+
:suffix-icon-color="$getSuffixIconColor()"
100+
:valid="! $errors->has($getStatePath)"
97101
>
98102
<div class="w-full flex justify-between items-center gap-x-5">
99103
<div class="grow">

src/Components/Quantity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace LaraZeus\Quantity\Components;
44

55
use Closure;
6-
use Filament\Forms\Components\Concerns\HasName;
76
use Filament\Forms\Components\TextInput;
7+
use Filament\Schemas\Components\Concerns\HasName;
88

99
class Quantity extends TextInput
1010
{

0 commit comments

Comments
 (0)