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

Missing state editing #16

Closed
andreazanini opened this issue Mar 8, 2024 · 7 comments
Closed

Missing state editing #16

andreazanini opened this issue Mar 8, 2024 · 7 comments

Comments

@andreazanini
Copy link
Contributor

Hello again,
i need to show the sum of some prices in the table and I would like with the popover to show a detail like a small cart.
I have multiple values and can sum properly with normal TextColumn by using formatStateUsing...
but when I use it with your package it says

Method LaraZeus\Popover\Tables\PopoverColumn::formatStateUsing does not exist.

So how can I do something similar?
Thanks

@atmonshi
Copy link
Member

atmonshi commented Mar 8, 2024

I'll see if its possible to support formatStateUsing but since you already have to use ->content() and you can pass the record, dont see a reason for formatStateUsing !

@andreazanini
Copy link
Contributor Author

andreazanini commented Mar 8, 2024 via email

@atmonshi
Copy link
Member

atmonshi commented Mar 8, 2024

ah I got you, can you test this branch see if it working
#17

@atmonshi
Copy link
Member

atmonshi commented Mar 9, 2024

you can update now to last version

@atmonshi atmonshi closed this as completed Mar 9, 2024
@andreazanini
Copy link
Contributor Author

andreazanini commented Mar 9, 2024 via email

@andreazanini
Copy link
Contributor Author

Hello, sorry to say that but it seems to not be working correctly

If i put like this the title is not changed

 PopoverColumn::make('utente.name')
                    // most of filament methods will work
                    //->sortable()
                    ->prefix('€ ')->formatStateUsing(fn (string $state) => "example")
                    ->label('Totale')

while doing this correctly puts "example" as text in the view

TextColumn::make('utente.name')
                    ->sortable()->formatStateUsing(fn (string $state) => "example"),

@andreazanini
Copy link
Contributor Author

I created pull request #18 that fixes on my side, feel free to check and edit

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

2 participants