Skip to content

Issues with $titleColumnKey shifting an extra column to table #1008

Answered by galingong
zedee asked this question in Q&A
Discussion options

You must be logged in to vote

Had the same problem until I figured it out - @ifox is right, I can confirm that if you override $indexColumns, $titleColumnKey has to have a key in it. Twill tries to access $indexColumns[$this->titleColumnKey], which means that whatever $titleColumnKey property is set to, that value has to be included in $indexColumns as a key, eg. if you left $titleColumnKey untouched (default value is 'title', already set in the package), $indexColumns has to be set like so:

    protected $indexColumns = [
        'title' => [
            'title' => 'Title',
            'field' => 'title'
        ],
        'member' => [
            'title' => 'Name',
            'relationship' => 'member',
          …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ifox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #349 on June 28, 2021 01:28.