Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masking not working when using $set() with MoneyInput #82

Open
rmznatly opened this issue Jan 16, 2025 · 0 comments
Open

Masking not working when using $set() with MoneyInput #82

rmznatly opened this issue Jan 16, 2025 · 0 comments

Comments

@rmznatly
Copy link

rmznatly commented Jan 16, 2025

I encountered an issue with the MoneyInput field.

When I define a MoneyInput like this:

TextInput::make('price_to')
    ->live()
    ->label('Price To')
    ->debounce(500)
    ->afterStateUpdated(function (Set $set, $state) {
        $set('price', $state);
    }),
MoneyInput::make('price')
    ->label('Price')
    ->default(123)

I can initially display and use the input without issues. However, when I try to set a value to the input dynamically using $set(), the input value is updated, but the masking is not applied. The value is simply displayed as a raw number|string without the expected mask.

moneyinput_problem.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant