Vue-tables-2: Show/hide table column

Created on 9 Mar 2017  路  8Comments  路  Source: matfish2/vue-tables-2

  • Vue.js version: 2
    Is this version support show / hide column in table? Just like filtering by column
feature request

Most helpful comment

I think this issue is not yet closed because i mean show or hide column by checkbox not by screen size

All 8 comments

The columnsDisplay option allows you to control the display of the columns by screen size

There is an option to control the display of the columns by checkbox? For instance if a checkbox is checked the column related to this checkbox will disappear?

I think this issue is not yet closed because i mean show or hide column by checkbox not by screen size

@matfish2 do you think this enhancement request is possible? I've seen @leonfather 's suggestion implemented elsewhere http://filamentgroup.github.io/tablesaw/demo/toggle.html

This would provide users a greater deal of flexibility for users rather than the developer deciding what columns should or should not be shown on smaller screens.

Interesting suggestion. I think the best way would be to combine those two. I.e allow the developer to set the default visible columns for each screen size, and the user to customize it on run-time using the checkbox.
I will reopen the issue and hopefully implement it in the near future.

@matfish2 merging the two concepts sounds like a great idea 馃憤

As a workaround, I implemented something like this and based the data off of a computed useTable property. It's a bit hacky but seems to work just fine for what I need.

<v-server-table url="useTable.url" ref="table"
                v-if="useTable.type == 'first_table'"
                :columns="table.columns.first_table" :options="table.options"
                @loaded="onLoaded"></v-server-table>
<v-server-table url="useTable.url" ref="table"
                v-else-if="useTable.type == 'second_table'"
                :columns="table.columns.second_table" :options="table.options"
                @loaded="onLoaded"></v-server-table>

Is it doable to hide toggler column? Cause I toggle by row-click event, so don't need toggler column anymore.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bb78657 picture bb78657  路  6Comments

jigarzon picture jigarzon  路  3Comments

VladZen picture VladZen  路  4Comments

sylvaincaillot picture sylvaincaillot  路  3Comments

dhdmstjs picture dhdmstjs  路  4Comments