display null values as 'null'
I have a table widget, where I want to display unconfirmed users. How can I display the string 'null' in the 'email_verified_at' column, when it's null?
Here's what I have so far:
6 Replies
You could probably just use the ->placeholder('null') as it will be used when the value is null so you don't really need the formatStateUsing 🤔
@dissto This is of course correct!
I guess I'll have to wait a bit longer to figure out, what
formatStateUsing
does...
Thank you!@jak888 there is nothing wrong with using
formatStateUsing
you probably just had a slight hickup with the passed parameter. I dont think $value
will work though, so you would need $state
or $record
. As stated in the docs
So something like that would also work. Its up to you if you prefer the extra step 😋
That's where I got confused (and why even my more simpler tries didn't work). Correct me if I'm wrong, but javascript would not care what you call your parameter?
i think you are right. Im not too knowledgeable about js though 😊
OK, then
Thanks a bunch!