Added vuejs-datatable to nuxt, shows only table colums and rows in text
thebspin opened this issue · 8 comments
I'm trying to add this beauty to my nuxt installation.
I made a vuejs-datatable.js file inside the plugins folder with this content:
import Vue from 'vue'
import DatatableFactory from 'vuejs-datatable/dist/vuejs-datatable.esm.js'
Vue.use(DatatableFactory)
I then registrered it as a plugin using:
plugins: ['@/plugins/vuetify', '@/plugins/vuejs-datatable'],
And lastly i added it to the transpiler using:
transpile: ['vuetify/lib', '/plugins/vuejs-datatable.js'],
Now this is my result:
The code im using in my vue file comes from the github readme
<datatable :columns="columns" :data="rows"></datatable>
And using the standard colums and rows.
My dev console is empty.
Hi,
What is the problem about it ? Could you please tell me more about the expected behavior, and the nature of the problem you are encontering ?
Hi,
What is the problem about it ? Could you please tell me more about the expected behavior, and the nature of the problem you are encontering ?
Hi! Well as you can see on the screenshot there is no styling or working functions like sorting. It seems like all it does is spit out the html for tables (tr and td's) but there is no css or javascript being imported.
I guess you're using v1.7, which relies on Glyphicons ( see #35, and more specifically, #4 ).
This module does not provide any stylesheet: you are supposed to style the table yourself, either by writing CSS rules that applies to the table, or by configuring classes to apply on elements (see this tutorial, which applies to the 2.0 branch, but 1.7 works almost the same).
You can find the full list of options in the code (docs are incomplete about this for now)
Note that a new version is currently in test, and should be released soon. Docs will be updated accordingly.
Ah i see, i missed that entirely i guessed it came with some basic mockup. What about the tables not sorting (with more data in them obviously).
Does 2.0 also support me moving columns in different order?
Tables sorting should work (see #35). If it really does not work, please provide a reproduction so I can help you find why.
Changing column order is not a planned feature, that can bring some extra complexity (and weigth) that does not concern most of the users. Thus, I don't think I'll spend time for this.
Is it OK? May I close the issue?
It's okay for now, can i do a PR if i add column order myself?
Of course! I would be pleased to integrate it in the package, if it is lightweight enough. Please make sure that you use the latest develop
in typescript ;) and please add unit/integration tests for it. I'll take care of e2e testing when it is ready
Cheers!