Skip to content

Only include column with new formatting if displayed in table? #166

Answered by uqjohart
uqjohart asked this question in Q&A
Discussion options

You must be logged in to vote

Woho fixed it! I have to mess with the withClumns but that let me use the $livewire call you provided thanks :D

->withColumns(function ($livewire) {
    $returnedArray = [];
    $displayed = $livewire->isTableColumnToggledHidden('staff.username');
    if (!$displayed) $returnedArray[] = Column::make('staff.username');
    return $returnedArray;
})

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@uqjohart
Comment options

@uqjohart
Comment options

@uqjohart
Comment options

Answer selected by uqjohart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants