njleonzhang / vue-data-tables

A simple, customizable and pageable table with SSR support, based on vue2 and element-ui

Home Page:https://njleonzhang.github.io/vue-data-tables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to hide spesific column?

akbarsaputrait opened this issue · comments

Online reproduce

https://www.njleonzhang.com/vue-data-tables/#/en-us/event

Expected Behavior

Add the hidden spesific column feature please.

Current Behavior

I cant hide my spesific column

Steps to Reproduce

Detailed Description

#Motivation / Use Case
I need to hide my spesific column, and add some action button also when i click it, will return the the value of column that i hide.

#Expected Behavior
I cant hide my spesific column, like some id of my data

Other Information

It seems el-table itself doesn't have this feature.
I think you can hide the content of the column, and then show it after click some button as a workaround.

So, if i have a data like this { id: 1, name: "Inventory 1", store: "Store A", space: "Space A", qty_in: "10", qty_out: "5", } i just need to doesn't set prop: id to hide the id value ,right?

and then, if i need to get the id value, just like this props.row.id right??

I have just tried, you can implement via v-if on el-table-column, sample:

http://jsfiddle.net/zpczjl/a72oqevy/2/

Anyway, this is a el-table problem, not related to vue-data-tables