Skip to content

Commit 62831b8

Browse files
committed
make wrapper class names configurable
1 parent 31d5421 commit 62831b8

File tree

8 files changed

+44
-14
lines changed

8 files changed

+44
-14
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ Our component parameters:
106106
id: {
107107
type: String
108108
},
109+
/**
110+
* Set the wrapper classes.
111+
*
112+
* @type String
113+
*/
114+
wrapperClassName: {
115+
type: String,
116+
default: 'table-responsive d-print-inline'
117+
},
109118
/**
110119
* Set the table classes you wish to use, default with bootstrap4
111120
* but you can override with: themeforest, foundation, etc..

example/index.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
(function webpackUniversalModuleDefinition(root, factory) {
22
if(typeof exports === 'object' && typeof module === 'object')
3-
module.exports = factory(require("Vue"), require("jQuery"));
3+
module.exports = factory(require("jQuery"), require("Vue"));
44
else if(typeof define === 'function' && define.amd)
5-
define("VdtnetTable", ["Vue", "jQuery"], factory);
5+
define("VdtnetTable", ["jQuery", "Vue"], factory);
66
else if(typeof exports === 'object')
7-
exports["VdtnetTable"] = factory(require("Vue"), require("jQuery"));
7+
exports["VdtnetTable"] = factory(require("jQuery"), require("Vue"));
88
else
9-
root["VdtnetTable"] = factory(root["Vue"], root["jQuery"]);
10-
})(window, function(__WEBPACK_EXTERNAL_MODULE_vue__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
9+
root["VdtnetTable"] = factory(root["jQuery"], root["Vue"]);
10+
})(window, function(__WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE_vue__) {
1111
return /******/ (function(modules) { // webpackBootstrap
1212
/******/ // The module cache
1313
/******/ var installedModules = {};
@@ -450,6 +450,16 @@ var myUniqueId = 1;
450450
"default": null
451451
},
452452

453+
/**
454+
* Set the wrapper classes.
455+
*
456+
* @type String
457+
*/
458+
containerClassName: {
459+
type: String,
460+
"default": 'table-responsive d-print-inline'
461+
},
462+
453463
/**
454464
* Set the table classes you wish to use, default with bootstrap4
455465
* but you can override with: themeforest, foundation, etc..
@@ -553,7 +563,8 @@ var myUniqueId = 1;
553563
return this.jquery || window.jQuery;
554564
},
555565
classes: function classes() {
556-
var classes = 'table-responsive d-print-inline vdtnet-container';
566+
var that = this;
567+
var classes = "".concat(that.containerClassName, " vdtnet-container");
557568

558569
if (this.hideFooter) {
559570
classes += ' hide-footer';
@@ -22415,7 +22426,7 @@ __webpack_require__.r(__webpack_exports__);
2241522426
/*! no static exports found */
2241622427
/***/ (function(module, exports, __webpack_require__) {
2241722428

22418-
module.exports = __webpack_require__(/*! /Users/tech/Desktop/work/niiknow/vue-datatables-net/example/app.js */"./example/app.js");
22429+
module.exports = __webpack_require__(/*! /Users/tomnoogen/Desktop/work/niiknow/vue-datatables-net/example/app.js */"./example/app.js");
2241922430

2242022431

2242122432
/***/ }),

example/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/index.js": "/index.js?id=853e6b6a981219e3715e",
3-
"/index.js.map": "/index.js.map?id=4efd61eae652345518b1"
2+
"/index.js": "/index.js?id=ad7b8d4944a8f079b5a3",
3+
"/index.js.map": "/index.js.map?id=8c2d8ad5aaef138c6996"
44
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-datatables-net",
33
"description": "Vue jQuery DataTables.net wrapper component",
4-
"version": "1.1.6",
4+
"version": "1.1.7",
55
"author": "[email protected]",
66
"license": "MIT",
77
"main": "lib/index.js",

src/VdtnetTable.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ export default {
4545
type: String,
4646
default: null
4747
},
48+
/**
49+
* Set the container classes.
50+
*
51+
* @type String
52+
*/
53+
containerClassName: {
54+
type: String,
55+
default: 'table-responsive d-print-inline'
56+
},
4857
/**
4958
* Set the table classes you wish to use, default with bootstrap4
5059
* but you can override with: themeforest, foundation, etc..
@@ -139,7 +148,8 @@ export default {
139148
return this.jquery || window.jQuery
140149
},
141150
classes() {
142-
let classes = 'table-responsive d-print-inline vdtnet-container'
151+
const that = this
152+
let classes = `${that.containerClassName} vdtnet-container`
143153
if (this.hideFooter) {
144154
classes += ' hide-footer'
145155
}

0 commit comments

Comments
 (0)