dwqs / v2-table Goto Github PK
View Code? Open in Web Editor NEWA simple table component based Vue 2.x: https://dwqs.github.io/v2-table/
License: MIT License
A simple table component based Vue 2.x: https://dwqs.github.io/v2-table/
License: MIT License
Hello,
Your v2-table is really awesome! But I am getting an error while trying to use it in a single html page design, could you please provide me some suggestions? This is what I did:
<script src="vue.js"></script> <script src="v2-table/v2-table.js"></script>Vue.use(V2Table);
[Vue warn]: Error in nextTick: "TypeError: i.a is not a constructor"
found in
---> at src/components/table.vue
Best,
I think about opportunity refresh my data.
How to call method on demand
fetchData() {
this.$http.get('v_sim.php').then(response => {
this.list = response.body
}, response => { return 'error' })
}
Maybe some simple solutions e.g. some icon similar to sortable in first header column?
Or maybe is something similar in library?
Thanks for v2-table 👍
And for QuickStart & Example give 💯
Hello I've been using the v2-table for some design purpose but I could not figure out a way to bind the checked attribute of column with type "selection", so I cannot set some rows to be selected programmably, I've tried using "prop" attribute but it won't work...
e.g:
data: [{checked: true, name: 'jason', state:'CA'}, {checked: false, name: 'mike', state:'CA'}, {checked: true, name: 'Lu', state:'CA'},...]
Do you have any example upon this functionality?
Thank you very much for your help!
Best,
When some data field value is 0, it can't display in table
the page displays several tables, some of them are hidden and initially, there is no data in them, after switching to the tab, the data is loaded but the scroll bar does not appear
Mark and will fix it as soon as possible
<div v-if="selectedLength > 0" style="text-align: center;">Test</div>
methods: {
handleSelectChange(rows) {
this.selectedRequests = [].concat(rows);
this.selectedLength = rows.length
},
}
<v2-table
:data="filterAndSortData(requests)"
stripe
:default-sort="{
prop: 'timestamp',
order: ascending ? 'ascending' : 'descending',
}"
:total="requests.length"
:shown-pagination="true"
:pagination-info="paginationInfo"
:row-class-name="getRowClassName"
@sort-change="handleSortChange"
@page-change="handlePageChange"
@select-change="handleSelectChange"
>
I haven't be able to understand why, but if I remove the v-if="selectedLength > 0"
then my check and uncheck on the boxes works perfectly fine.
however when I need to actually use the information being checked and unchecked, it seems like its basically freezing my app. I can't even use my sort by ascending/descending but as soon as I remove v-if="selectedLength" the problem resolves itself.
My columns are the date, which is depended on the user's time select. Such as 2018-08-01, 2018-08-02,2018-08-03 and so on. So my column slot like following:
<v2-table>
<v2-table-column v-for="(column,index) in columns" :key="index" :label="column.label" :width="column.width" :prop="column.key"></v2-table-column>
</v2-table>
when columns are updated, table will not be updated
The following code in table-body.js on line 44. I found the this.row
is undefined, I replaced it with this.rows[index]
, then will be OK.
if (typeof this.table.rowClassName !== 'undefined') {
const customRowClass = typeof this.table.rowClassName === 'function' ? this.table.rowClassName({ row: this.row, rowIndex: index }) : this.table.rowClassName;
cls.push(typeof customRowClass === 'string' ? customRowClass : '');
}
Hello! Thank you for the great package!
I have a question. Can you please tell me, how can I insert an empty row to the table? Can you show me how to do it on this example called "Fixed columns and header"?
The problem is that I want to insert several empty rows with specific text in it.
Hello,
I have a list of data passed by props, when I accessed the table component I ended up receiving this data and doing a "for" within the "v2-table-column" element, eg:
<v2-table-column v-for="coluna in colunas" :label="coluna.label" :prop="coluna.prop" sortable width="200"></v2-table-column>
where "coluna " receives an array of categories, for example: list[0].departamentos[0].nome
How do I list these arrays within the current column?
Another question, why is the table not 100% wide?
Hey thanks for that nice component, I have an issue when I try to destroy that component (route change) it always throws that error:
this.xThumb is null
Any idea?
Hi guys,
I'm using Nuxt.JS.
I have an error window is not defined
, but By using <no-ssr></no-ssr>
it works.
But I want better for SEO.
Thanks in advance.
I want to copy some content in a column in a row but I am unable to select any text in any row.
Hello,
how can i use v2 table to print a nested objects table.
let's say i got from backend (laravel controller) a list of products with their sales
(product->with('sales')->get()), and each product has a different number of sales.
i want to show them like this : ( sales table inside each product row)
id | Product | sales |
1 | Product_1 | id | sale | price
1 | sale_1 | price_1
2 | sale_2 | price_2
2 | Product_2 | id | sale | price
3 | sale_3 | price_3
4 | sale_4 | price_4
5 | sale_5 | price_5
Hi there. I would like to ask you if is it possible to use this component vue without having all the flow with webpack and stuff related. I am a .Net core developer and I really like to use it on old way,.. you know, adding the script tag , css, and just register the component and use it.
Thanks.
Hi there!
I'm facing a problem with table's scroll.
The mentioned table is inside a b-modal (bootstrap vue)
I'm using a fixed height enough to display 3 rows
If I scroll all it down to see the 5#,6#,7# row and then switch to other modal containing <= 3 rows
these 3 rows arent displayed. But i can scroll up back and see those rows
At first initialization, Y Scrollbar not shown. But after second redrawn, the scroll bar will be shown (I use tab view)
sorry. Help me !! how to filter table ??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.