-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Hello,
On my FilamentPHP table, i have some dynamic columns build like:
$columns[] = TextColumn::make('total_user')
->label('Total')
->alignCenter()
->getStateUsing(function ($record, Table $table) use ($total_user) {
$total = 0; // Initialize total
foreach ($table->getColumns() as $column) {
/** @var TextColumn $column */
$columnName = $column->getName();
// Check if the column name starts with 'day_'
if (strpos($columnName, 'day_') === 0) {
// Get the state of the current column (value)
$state = $column->getState();
// Add the state to the total if it's numeric
if (is_numeric($state)) {
$total += $state;
}
}
}
return $total;
});
When I browse the table using filamentphp all good, that column state returns the correct value, but in the export it comes with value 0 any idea what it may be wrong?
@
Metadata
Metadata
Assignees
Labels
No labels