Comments (4)
I believe what you are looking for is `placeholder()'
If the column value is null, placeholder
is used instead of formatState
You have another option of using getStateUsing
to customize the column value.
from filament.
I think its an expected behavior, as in the two columns
Tables\Columns\TextColumn::make('deadline') ->label('وقت الانتهاء') ->formatStateUsing(fn (Order $order) => $order->deadline ?? 'Not Exists') ->dateTime() ->sortable()
Tables\Columns\TextColumn::make('branch.name') ->formatStateUsing(fn (Order $order) => $order->deadline ?? 'Not Exists') ->numeric() ->sortable()
You are specifying the type of the column, either numeric()
or dateTime()
.
Just use the first column
Tables\Columns\TextColumn::make('status') ->formatStateUsing(fn (Order $order) => $order->deadline ?? 'Not Exists') ->label('الحالة') ->searchable()
And format the dateTime in the formatStateUsing
from filament.
@malzariey no i duplicated it for example only.
method doesn't work with any text column that gets its data from relationship
from filament.
getStateUsing()
is used to define the content of the column. formatStateUsing()
should only be used to FORMAT state that already exists. In this case, since there is no state, there is nothing to format.
from filament.
Related Issues (20)
- Builder bug with addActionBetween
- Spatie Translatable + FileUpload image won't work with RelationManager HOT 4
- Modal Blade component has a problem with Nesting Components HOT 1
- Tenant Pages Livewire Component Error HOT 1
- SelectFilter has no selectablePlaceholder() method HOT 2
- try to import a file larger than 1MB, a validation error will occur. HOT 7
- Template Filament project doesn't work HOT 5
- MDE behaves differently when submitted via mouse click vs keyBinding
- modalDescription method doesn't update view for Create action requiresConfirmation overlay HOT 1
- requiredwith does not work with FileUpload
- ImageEntry not show stacked images
- Header action of table open modal only after 2 (two) clicks HOT 7
- bug login expired HOT 1
- In case anyone is having the same issue. I just needed to target the right release version:
- Table filter using a select on a relationship with a column based on enum class
- Cant download files from local/private storage HOT 1
- SpatieMediaLibraryImageEntry infolist not displaying non-image media uploads HOT 1
- FileUpload acceptedFileTypes audio check only mp3
- Problem with multiple() in ToggleButtons HOT 2
- Error when login in login using xampp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament.