IconColumn no response
. Not getting any icons showing or ray() output. What am i missing? Ive tried adding a null for default if thats needed as i dont want an icon if false, but no difference. I know im missing something simple per usual.
6 Replies
You need the Closure as the argument and return the array from that. Not the closure as a value.
->options(fn ($record) => [...])
@Dennis Koch ah, i was going off the docs
@Dennis Koch they so something like
Hm, might even work for a IconColumn then.
Did you check the HTML if there is really no icon?
idk why, but i had to use getStateUsing() and then check $state within options. really weird. oh well
I don't think the options method works with bool return type. I had the same issue yesterday when trying to use bool for a Select component's options. Using '1' for true and '0' for false worked though. Although this could just be a different issue but idk.
@mark_chaney i wouldnt use options()
->icon(fn ($record) => return single string, not array)