Coder Social home page Coder Social logo

v2-table's Issues

TypeError: i.a is not a constructor

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,

Refreshing data in table + add icon to call method

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 💯

Is there a way to set specific rows to be checked?

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,

handleSelectChange doesn't work if the HTML in vue is accessing the data point being updated from the handle select change.

<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.

Table will not be updated with dynamical columns

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

event to check or uncheck checkboxlist

Hi, I have a table such as below. is there any way to trigger select-change event within the same row?
for example when i click the name column then the checkbox is selected for that row.

image

Thanks for your great work 👍

row-class-name attribute function return the row with undefined

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 : '');
}

How to insert empty full-width row?

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.

List array passed by props

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?

this.xThumb is null

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?

How to working well on SSR (Nuxt)?

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.

How to show nested objects table

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

Use withouth webpack

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.

v2-table scroll issue

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

https://hastebin.com/zamuxovowo.xml

Y Scroll Bar Not Always Shown

At first initialization, Y Scrollbar not shown. But after second redrawn, the scroll bar will be shown (I use tab view)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.