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

[4.x] Add decimalPlaces argument to component money function #15841

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

dmason30
Copy link
Contributor

@dmason30 dmason30 commented Mar 11, 2025

Description

The Number::currency() function had the precision argument added in Laravel 11.42.

Named the new argument decimalPlaces to match the ->numeric() function.

Infolist

Adds decimalPlaces argument:

use Filament\Infolists\Components\TextEntry;

TextEntry::make('price')
    ->money('EUR', decimalPlaces: 3)

Table

Adds decimalPlaces argument:

use Filament\Tables\Columns\TextColumn;

TextColumn::make('price')
    ->money('EUR', decimalPlaces: 3)

Table Summarizer

Adds decimalPlaces argument:

use Filament\Tables\Columns\TextColumn;

TextColumn::make('price')
    ->summarize(Sum::make()->money('EUR', decimalPlaces: 3))

Visual changes

  • None

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin danharrin added the enhancement New feature or request label Mar 12, 2025
@danharrin danharrin added this to the v4 milestone Mar 12, 2025
@danharrin danharrin merged commit 6483811 into filamentphp:4.x Mar 12, 2025
8 checks passed
@danharrin
Copy link
Member

Cheers

@dmason30 dmason30 deleted the money-decimal-places branch March 12, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants