Skip to content

Commit 10801c4

Browse files
committed
add ability to disable theme
1 parent 0397dcd commit 10801c4

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939

4040
## Usage
4141

42-
Pass either `data`, `from`, or `server` as a data source. Everything else is optional.
42+
Pass `cols` and either `rows`, `from`, or `server` as a data source. Everything else is optional.
4343

4444
Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific configuration options.
4545

@@ -78,7 +78,7 @@ export default {
7878
search: true / false || {}, // boolean or search settings object
7979
server: {}, // server settings object
8080
sort: true / false || {}, // boolean or sort settings object
81-
theme: 'mermaid', // string with name of theme
81+
theme: 'mermaid', // string with name of theme or 'none' to disable
8282
width: '100%' // string with css width value
8383
}
8484
}

attributes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"description": "Boolean or sort settings object. Default: false"
3737
},
3838
"gridjs-vue/theme": {
39-
"type": "string",
40-
"description": "String with name of theme. Default: 'mermaid'"
39+
"type": ["string"],
40+
"description": "String with name of theme or 'none' to disable. Default: 'mermaid'"
4141
},
4242
"gridjs-vue/width": {
4343
"type": "string",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gridjs-vue",
33
"description": "A Vue.js wrapper component for Grid.js",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"license": "MIT",
66
"private": false,
77
"main": "./dist/index.js",

src/gridjs-vue.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export default {
6464
}
6565
},
6666
grid: null,
67-
styles: null,
6867
uuid: null,
6968
wrapper: null
7069
}
@@ -128,7 +127,7 @@ export default {
128127
this.wrapper = await elementReady(`[data-uuid="${this.uuid}"]`)
129128
130129
// assign styles
131-
this.assignStyles()
130+
if (this.theme !== 'none') this.assignStyles()
132131
133132
// instantiate grid.js
134133
if (this.wrapper && (this.options.data || this.options.from || this.options.server)) {

0 commit comments

Comments
 (0)