Skip to content

Commit

Permalink
Added ColVisibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mllull committed Mar 19, 2021
1 parent 9bd5b39 commit e3aeaf3
Show file tree
Hide file tree
Showing 10 changed files with 1,583 additions and 1,177 deletions.
6 changes: 5 additions & 1 deletion src/assets/menu/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@
{
"name": "Crud",
"to": "/datatable/crud"
},
{
"name": "Column Visibility",
"to": "/datatable/colvisibility"
}
]
},
Expand Down Expand Up @@ -804,4 +808,4 @@
]
}
]
}
}
1 change: 1 addition & 0 deletions src/components/column/Column.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface ColumnProps {
alignFrozen?: string;
exportable?: boolean;
exportFunction?: Function;
isVisible?: boolean;
filterMatchMode?: string;
}

Expand Down
90 changes: 47 additions & 43 deletions src/components/column/Column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,175 +4,179 @@ export default {
props: {
columnKey: {
type: null,
default: null,
default: null
},
field: {
type: String,
default: null,
default: null
},
sortField: {
type: [String, Function],
default: null,
default: null
},
filterField: {
type: String,
default: null,
default: null
},
dataType: {
type: String,
default: "text",
default: "text"
},
sortable: {
type: Boolean,
default: false,
default: false
},
header: {
type: null,
default: null,
default: null
},
footer: {
type: null,
default: null,
default: null
},
style: {
type: null,
default: null,
default: null
},
class: {
type: String,
default: null,
default: null
},
headerStyle: {
type: null,
default: null,
default: null
},
headerClass: {
type: String,
default: null,
default: null
},
bodyStyle: {
type: null,
default: null,
default: null
},
bodyClass: {
type: String,
default: null,
default: null
},
footerStyle: {
type: null,
default: null,
default: null
},
footerClass: {
type: String,
default: null,
default: null
},
showFilterMenu: {
type: Boolean,
default: true,
default: true
},
showFilterOperator: {
type: Boolean,
default: true,
default: true
},
showClearButton: {
type: Boolean,
default: true,
default: true
},
showApplyButton: {
type: Boolean,
default: true,
default: true
},
showFilterMatchModes: {
type: Boolean,
default: true,
default: true
},
showAddButton: {
type: Boolean,
default: true,
default: true
},
filterMatchModeOptions: {
type: Array,
default: null,
default: null
},
maxConstraints: {
type: Number,
default: 2,
default: 2
},
excludeGlobalFilter: {
type: Boolean,
default: false,
default: false
},
filterHeaderClass: {
type: String,
default: null,
default: null
},
filterHeaderStyle: {
type: null,
default: null,
default: null
},
filterMenuClass: {
type: String,
default: null,
default: null
},
filterMenuStyle: {
type: null,
default: null,
default: null
},
selectionMode: {
type: String,
default: null,
default: null
},
expander: {
type: Boolean,
default: false,
default: false
},
colspan: {
type: Number,
default: null,
default: null
},
rowspan: {
type: Number,
default: null,
default: null
},
rowReorder: {
type: Boolean,
default: false,
default: false
},
rowReorderIcon: {
type: String,
default: "pi pi-bars",
default: "pi pi-bars"
},
reorderableColumn: {
type: Boolean,
default: true,
default: true
},
rowEditor: {
type: Boolean,
default: false,
default: false
},
frozen: {
type: Boolean,
default: false,
default: false
},
alignFrozen: {
type: String,
default: "left",
default: "left"
},
exportable: {
type: Boolean,
default: true,
default: true
},
exportFunction: {
type: Function,
default: null,
default: null
},
filterMatchMode: {
type: String,
default: null,
default: null
},
isVisible: {
type: Boolean,
default: true
}
},
render() {
return null;
},
}
};
</script>
Loading

0 comments on commit e3aeaf3

Please sign in to comment.