filamentphp/filament
Ver no GitHubAttribute with name length is not giving the desired output when using ->searchable(isIndividual: true)
Open
#15.073 aberto em 12 de dez. de 2024
bug in dependencyhelp wantedmedium priorityunconfirmed
Métricas do repositório
- Stars
- (30.736 stars)
- Métricas de merge de PR
- (Mesclagem média 2d 15h) (72 fundiu PRs em 30d)
Description
Package
filament/filament
Package Version
v3.2.130
Laravel Version
v.11.35.0
Livewire Version
No response
PHP Version
PHP 8.3
Problem description
When you have an attribute named length in the database and you use the ->searchable(isIndividual: true) in the tables of filament you get a zero in the search field and the search field is not working. When deleting the zero to filter, the zero keeps coming back.
Expected behavior
That the zero is not there and that I am able to filter individual on an attribute named length.
Steps to reproduce
- Create a table with a column that is named length with type integer or float
- Create a standard resource of the model
- Make the column length individual searchable
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id')
->label('ID'),
Tables\Columns\TextColumn::make('length')
->suffix(' mm')
->searchable(isIndividual: true)
->sortable(),
Tables\Columns\TextColumn::make('total_meters')
->suffix(' m')
->sortable(),
Tables\Columns\TextColumn::make('supplier_reference')
->label('Reference')
->sortable(),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
Reproduction repository (issue will be closed if this is not valid)
https://github.com/Geoffry304/filament-length-attribute-issue
Relevant log output
No response