https://twill.io logo
My column filters don't show.. The values of the f...
# ❓questions
e
My column filters don't show.. The values of the fields show, but the field titles don't.. I have in my admin controller:
Copy code
protected $titleColumnKey = 'title';

    protected $indexColumns = [
        'title' => [
            'title' => 'Title',
            'field' => 'title',
        ],
        'firstname' => [
            'title' => 'Firstname',
            'sort' => true,
            'field' => 'firstname',
            
        ],
        'lastname' => [
            'title' => 'Lastname',
            'sort' => true,
            'field' => 'lastname',
        ],
    ];
i
Hi @elkex this code wouldn't get you any filters though
did you setup a filters property?
e
Strange, I did it like this in another project and it went without problems..
Did not setup any filters
i
which filters are you talking about? Can you share a screenshot?
there are no filters that would magically appears without setting them in code, so we're probably talking about something different
e
Above these columns
In another project I managed to get it like this
My new project will not show the column titles for some reason
i
oh ok the table headers
in the first screenshot is the module nested?
e
No..
But it has the hasNesting enabled
i
so it is nested 😉
nested listing don't currently show the columns headers as they would be misaligned when you have nested records
and sorting wouldn't work as the listing is ordered by position
e
Aha okay
Something completely different: when I render an image field that has no value, it renders a random 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' string, is there a way to check if an image field is used or not?
i
$item->hasImage('...'
e
Nice, thanks!
4 Views