Is there a way to hide column headline and filtering options conditionally?

UI Components for Vue
Post Reply
User avatar
Posts: 1
Joined: 22 Apr 2021, 14:49

23 Apr 2021, 08:35

Hello everyone, I have a question. When using dynamic columns with the DataTable component is there any way to remove the filtering header options only for a single column?


I add an extra property to my columns array and I use it to conditionally hide sorting but I need a way to hide filtering as well:

Code: Select all

<Column v-for="col of columns" :sortable="col.sortable" ... ></Column> 
Also, how do I remove the column headline from the column header section?

<template v-if="column.sortable" #header>

The code above does not seem to work. It only adds whatever I put inside to the content that is already there.

Posts: 121
Joined: 23 Oct 2020, 09:28

11 Jun 2021, 15:18


You can use

Code: Select all

<Column v-if="col.sortable" ... ></Column> 

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests