Giter Club home page Giter Club logo

vue-table's Introduction

npm npm


Please Note!

This is the previous version that works with Vue 1.x. The most up-to-date version is the Vuetable-2. If you like it, please star the Vuetable-2 repo instead, or make a small donation to support it.

This version is "no longer supported" as I do not have time to maintain different version.


vuetable - data table simplify!

  • No need to render the table yourself
  • One simple vuetable tag
  • Display data retrieved from server with sort options
  • Support multi-column sorting (v1.2.0) by @balping
  • Pagination component included, swap-able and extensible
  • Define fields to map your JSON data structure
  • Define row actions and capture the click event to do whatever you want
  • Field display customizable via callback function inside Vue.js instance
  • Programmatically show/hide any field via reactivity of fields definition
  • Use your favorite CSS framework classes to nicely format your table and displayed data
  • Events to allow control from Vue.js instance programmatically
  • Capture events from vuetable to manipulate your table and your data
  • Should work with any pre-defined JSON data structure
  • Should work with any CSS Framework, e.g. Semantic UI, Twitter's Bootstrap
  • Optional detail row to display additional data (v.1.2.0)

vuetable is only working for Vue 1.x, vuetable-2 is for Vue 2.x

If you're looking for the version that's working with Vue 2.x, please go to vuetable-2 repo. However, I still have no time to work on the documentation. But if you're familiar enough with vuetable, it shouldn't be any much different. Look at the what's changed for info on changes from version 1 and the upgrade guide on how you could upgrade from version 1.


Note on vue-resource version

vuetable internally uses vue-resource to request data from the api-url. Prior to v1.5.3, vuetable uses vue-resource v0.7.4 and it retrieves the returned data from response.data object. However, since v0.9.0 the response.data has been renamed to response.body. vuetable v1.5.3 onward has been updated to use vue-resource v1.0.2.

This will cause problem with vuetable to display no data because the expected object key is no longer existed and some other related problems as discussed in #100.

If you're using vue-resource in your project and the version is 0.9+, please upgrade to use vuetable v1.5.3.

Breaking Changes

v1.5.0

  • deprecated props
    • detail-row-callback: use row-detail-component instead

v1.3.0

  • deprecated props
    • paginateConfig: use paginateConfigCallback instead
    • detail-row: use detail-row-callback instead

v1.2.0

  • sort-order option type was changed from Object to Array to support multi-sort, therefore it should be declared as array. #36

    <vuetable 
      //...
      :sort-order="[{ field: 'name', direction: 'asc' }]"
    ></vuetable>
    

##Live Demo


What is vuetable?

vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination sub-component. You can also add buttons to each row and hook an event to it

image

Please note that all the examples show in here are styling using Semantic UI CSS Framework, but vuetable should be able to work with any CSS framwork including Twitter's Bootstrap. Please read through and see more info below.

You do this:

    <div id="app" class="ui vertical stripe segment">
        <div class="ui container">
            <div id="content" class="ui basic segment">
                <h3 class="ui header">List of Users</h3>
                <vuetable
                    api-url="http://example.app:8000/api/users"
                    table-wrapper="#content"
                    :fields="columns"
                    :item-actions="itemActions"
                ></vuetable>
            </div>
        </div>
    </div>
	<script>
	    new Vue({
	        el: '#app',
	        data: {
	            columns: [
	                'name',
	                'nickname',
	                'email',
	                'birthdate',
	                'gender',
	                '__actions'
				],
	            itemActions: [
	                { name: 'view-item', label: '', icon: 'zoom icon', class: 'ui teal button' },
	                { name: 'edit-item', label: '', icon: 'edit icon', class: 'ui orange button'},
	                { name: 'delete-item', label: '', icon: 'delete icon', class: 'ui red button' }
	            ]
	        },
	        methods: {
	            viewProfile: function(id) {
	                console.log('view profile with id:', id)
	            }
	        },
	        events: {
	            'vuetable:action': function(action, data) {
	                console.log('vuetable:action', action, data)
	                if (action == 'view-item') {
	                    this.viewProfile(data.id)
	                }
	            },
	            'vuetable:load-error': function(response) {
	                console.log('Load Error: ', response)
	            }
	        }
        })
	</script>

And you get this! image

Since I'm mainly using Semantic UI as my default CSS Framework, all the css styles in vuetable are based on Semantic UI. If you're using Twitter's Bootstrap css framework, please see documentation in the Wiki pages.

Usage

Javascript

//vue-table dependencies (vue and vue-resource)
<script src="https://cdn.jsdelivr.net/vue/1.0.28/vue.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/1.3.4/vue-resource.common.js"></script>

<script type="text/javascript" src="http://cdn.jsdelivr.net/vue.table/1.5.3/vue-table.min.js"></script>
//or
<script type="text/javascript" src="http://cdn.jsdelivr.net/vue.table/1.5.3/vue-table.js"></script>

Bower

$ bower install vuetable

NPM

$ npm install vuetable

Vueify version for Browserify and Webpack

Just import or require like so,

//
// firstly, require or import vue and vue-resource
//
var Vue = require('vue');
var VueResource = require('vue-resource');
Vue.use(VueResource);

//
// secondly, require or import Vuetable and optional VuetablePagination component
//
import Vuetable from 'vuetable/src/components/Vuetable.vue';
import VuetablePagination from 'vuetable/src/components/VuetablePagination.vue';
import VuetablePaginationDropdown from 'vuetable/src/components/VuetablePaginationDropdown.vue';

//
// thirdly, register components to Vue
//
Vue.component('vuetable', Vuetable);
Vue.component('vuetable-pagination', VuetablePagination)
Vue.component('vuetable-pagination-dropdown', VuetablePaginationDropdown)

You can combine the second and third steps into one if you like.

You need to explicitly register the pagination components using Vue.component() (instead of just declaring them through the components: section); otherwise, the pagination component will not work or swappable or extensible. I guess this is because it is embedded inside vuetable component.

Direct include

Just import the vue-table.js after vue.js and vue-resource.js library in your page like so.

	<script src="js/vue.js"></script>
	<script src="js/vue-resource.js"></script>
	<script src="js/vue-table.js"></script>

Then, reference the vuetable via <vuetable> tag as following

	<div id="app">
	    <vuetable
	        api-url="/api/users"
	        :fields="columns"
	    ></vuetable>
    </div>

	<script>
		new Vue({
			el: '#app',
			data: {
				columns: [
					'firstname',
					'lastname',
					'nickname',
					'birthdate',
					'group.name_en',
					'gender',
					'last_login',
					'__actions'
				]
			}
		})
	</script>
  • api-url is the url of the api that vuetable should request data from. The returned data must be in the form of JSON formatted with at least the number of fields defined in fields property.
  • fields is the fields mapping that will be used to display data in the table. You can provide only the name of the fields to be used. But if you would like to get the true power of vuetable, you must provide some more information. Please see Field Definition section for more detail.

For more detail, please see documentation in the Wiki pages.

Browser Compatability

As I use Chrome almost exclusively, it is gaurantee to work on this browser and it SHOULD also work for other WebKit based browsers as well. But I can't really gaurantee that since I don't use them regularly.

However, vuetable will NOT WORK on Internet Explorer (even IE11) due to the use of <template> tag inside <table> according to this. In order to make it work with CSS framework table styling, I have to preserve the use of <table> and <template> tag inside it.

It seems to work just fine in Microsoft Edge though. Anyway, if you find that it does not work on any other browser, you can let me know by posting in the Issues. Or if you are able to make it work on those browser, please let me know or create a pull request.

Contributions

Any contribution to the code (via pull request would be nice) or any part of the documentation (the Wiki always need some love and care) and any idea and/or suggestion are very welcome.

However, please do not feel bad if your pull requests or contributions do not get merged or implemented into vuetable.

Your contributions can, not only help make vuetable better, but also push it away from what I intend to use it for. I just hope that you find it useful for your use or learn something useful from its source code. But remember, you can always fork it to make it work the way you want.

Building

Run npm install

Then make sure, you have installed browserify:

# npm install browserify -g

You might need root access for running the above command.

Then you can simply run the build script included in the root folder:

$ ./build.sh

This will compile the vue components in the src directory to one file in the dist folder.

You might want to get a minified version, in this case run this:

$ ./build.sh production

For developement it's useful when it's not needed to recompile manually each time you make a change. If you want this convenience first install watchify globally:

# npm install watchify -g

then run

$ ./build.sh watch

Now each time you make a change, the source will be recompiled automatically.

License

vuetable is open-sourced software licensed under the MIT license.

vue-table's People

Contributors

abishekrsrikaanth avatar balping avatar eyalcohen4 avatar hallosascha avatar jaketoolson avatar jeroenherczeg avatar johnnyma avatar juniorfreitas2 avatar mdaliyan avatar mrvincs avatar ratiw avatar thomassjogren avatar tylertyssedal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-table's Issues

Loading label/icon during table computation

Hi,
At the moment when the component is rendering the table the content remains empty and it seems quite like nothing has been loaded.
I think it would be nice if it would be possible someway to implement a loading label or a loading icon where the content is being shown or anyway somewhere in the component in order to give users a better feedback.

Cheers,
Matteo

Search

Amazing add search option how datatables :D

Working with nested results on fields data?

Hello,

I'm working with a set of data that returns a list of "show logs" and their related "shows". What is getting returned when queried with Vuetable is something like this:

{
    "total": 8,
    "per_page": 2,
    "current_page": 1,
    "last_page": 4,
    "next_page_url": "http:\/\/dev.dev\/vuetable\/showlog?page=2",
    "prev_page_url": null,
    "from": 1,
    "to": 2,
    "data": [{
        "id": 2,
        "team_id": 1,
        "show_id": 10,
        "confirmed": 0,
        "active": 0,
        "canceled": 0,
        "archived": 0,
        "start": "2016-05-10 17:00:00",
        "end": "2016-05-10 18:00:00",
        "created_at": "2016-05-18 17:52:25",
        "updated_at": "2016-05-18 17:52:25",
        "show": {
            "id": 10,
            "team_id": 1,
            "user_id": 4,
            "name": "A show title",
            "startdate": "2016-05-03 00:00:00",
            "enddate": "2016-05-18 00:00:00",
            "starttime": "17:00:00",
            "endtime": "18:00:00",
            "freq": "2",
            "interval": "1",
            "byday": "TU",
            "created_at": "2016-05-18 17:52:25",
            "updated_at": "2016-05-18 17:52:25"
        }
    }]
}

Setting a field as id will work fine, but the information I would like to get is show.name. Is there any way to get that nested object information?

I've tried

{
 name: 'show',
sortField: 'show',
title: 'Title',
callback: 'setTitle',           
}

But doing a console.log on the value received by the callback is showing me an empty string, so I guess it doesn't play well with objects... ?

Too long pagination

Is there a way to put a limit to the number of links shown in the pagination?

pagination length

stop action events ?

I have vue-table with item-actions and with detail-row too.

When I click on button (item-action) both events are called. At first item-action and next is open detail-row. Is possible stop detail-row event ?

vue template in makeDetailRow

I want create in detailRow small form managed with VueJS. Is it possible ? I tried create template, but I was not successful.

Search

Is there any away to implement column search?

Tks

Pagination shown also when it is not needed

I've seen that the component is rendering the pagination control even if there is just a single page (ie: just 3 elements of 10 possible).

I think that the pagination control shouldn't be rendered in such situation like it happens in laravel.

This is more a suggestion than a real bug anyway.

Cheers,
Matteo

Making vue-table work with browserify / webpack

I've played around with this component and like it so far. Thank you @ratiw!

I tried to use it in a new laravel project (via browserify & using laravel elixir) and noticed it stopped working. Digging around, I see that because of the way it's structured, it wont work with browserify as it is trying to access Vue globally. Are there any plans to restructure it so it can be pulled into a project via require('vuetable') statement?

Im not an expert at this and still figuring out vue & browserify myself, but I think the component would need to be modularize / split into three .vue files: vuetable, vuetable-pagination, vuetable-pagination-dropdown. Each of these will have its own script, style and template code.

I might try and do this if I get some time and a chance to figure it out. I've added some links below for reference:

http://vuejs.org/guide/application.html#Modularization
https://github.com/vuejs/vueify
http://blog.tighten.co/setting-up-your-first-vuejs-site-using-laravel-elixir-and-vueify

Laracasts:
https://laracasts.com/series/learning-vue-step-by-step/episodes/13
https://laracasts.com/series/painless-builds-with-laravel-elixir/episodes/9

Possibility to define hidden column

Hi,
I think it would be nice to have the possibility to declare hidden columns like object index column which can be useful in some situations.

Cheers,
Matteo

Dynamic values in api-url

I want to insert a dynamic value into the api-url property like this:

<vuetable api-url="/api/v1/service_tasks/@{{ editingServiceTask.id }}/items"

So that I end up with a url like this:

/api/v1/service_tasks/2/items?sort=&page=1&per_page=10

However the url that is called looks like this:

/api/v1/service_tasks/%7B%7D/items?sort=&page=1&per_page=10

In other words instead of getting the value of editingServiceTask.id I'm just getting an opening and closing brace. I have checked that editingServiceTask.id does actually have a value.

I'm using blade, hence the @ in front of the braces.

How would I make his work?

Editing Wiki Docs - Fields Definitions

This is not an issue, but just small contribution to the wiki.

I cannot edit the wiki docs, so putting this here and @ratiw and add this as part of the docs for Field Definitions page:

Nested JSON Data

If the JSON data structure contains nested objects, eg:

{
    "links": {
        "pagination": {
            "per_page": 15,
        }
    },
    "data": [
        {
            "id": 1,
            "name": "xxxxxxxxx",
            "email": "[email protected]",
            "group_id": 1,
            "address" {
                "street_address":"123 abc place",
                "city":"townsville",
                "province":"Harbor",
                "country":"Antegria"
            }
        }
            .
            .
            .
        {
            "id": 50,
            "name": "xxxxxxxxx",
            "email": "[email protected]",
            "group_id": 3,
            "address" {
                "street_address":"456 xyz street",
                "city":"cityville",
                "province":"Portia",
                "country":"Norland"
            }
        }
    ]
}

In this case, the column names of nested objects can be specified in the following format:

```javascript
    var columns = ['name', 'email', 'address.city', 'address.country']
```

How to contribute?

Hi!

I'm planning to create a new multi sort feature and then make a pr.

However I'm stuck with browserify. I read this topic, but it didn't help much: #12

In the components directory you have several vue files, and if I get it right, vue-table.js is generated from them. But how exactly?

please make it can be used easily in vue-cli

i must import global "vue" package in my component just like 'var Vue = require('vue')'; if i don't do this, and it's an error;

but i am using keen-ui, vue-datepicker in my project, they just import themself, that's all;

so my question is , do you write 'vue-table' in a "script" way, and never test it in webpack???

New feature

Like a new feature, example:
vuetable:cell-changed

For inline editing data and update or any process after change data in the cell! :D

This is a component -very tiny, simple- for this work, only for text data, not for select, or check. But works fine!

https://github.com/jinzhe/vue-editable

Customize item actions depend on data record

I have a requiement that is display different action buttons according to data recording, For example, I want to active the unactivated items or deactivate the activated items, just like following picture.
screen shot 2016-06-07 at 10 25 05 pm
I can not attach extra info to cation buttons depend on record data. Also I read through the doc you provided however I found no solutions about this issue,can you give me some suggestions, Thank you!

Two tables - one page

I have two tables on my page.

And if I search through the second table, loading state always appends to the first one.

I guess the issue is in loadData function:
var wrapper = document.querySelector(this.tableWrapper) always finds first table.

Maybe var wrapper = this.$el could be used instead.

Nested custom headers

I'm trying to add authentication to the header using http-data, but the nested object becomes an array instead of a nested object.

{ "headers": { "Authorization": 'TOKENKEY' } }

Becomes: headers[Authorization]:

Uncaught TypeError: el.daterangepicker is not a function

I am wrapping Vue-Tables in a vuify file crmtable.vue.
I am new here so I might miss something obvious but when I add the dateColumns: ['created_at'], I get an error in the console :
"Uncaught TypeError: el.daterangepicker is not a function"
and te filter in that column will not work (it renders bold)

is daterangepicker a dependency?

thank you!

How to do inline-edit in vue-table?

Hello,

I want to do a inline-edit.
For example, a cell

<td>
<input type="checkbox">
<span>male</span>
</td>

I want to do: when user click this cell, the value is changed to "female", and save it back to db.

How should I do it?

Thank you.

Accessing nested object data from laravel blade

Looking at the latest bootstrap example you have added detail rows. What is the correct way to access nested objects. Whenever I try to do so, I get a response

Properties:
{{ old_list.$key }} - {{ old_list.$value }}
{{ new_list.$key }} - {{ new_list.$value }} 

which is basically returning the text of my javascript, not the list of attributes in that object.

In my definition I have a template:

<vuetable v-ref:vuetable
                  api-url="/log"
                  data-path="data"
                  pagination-path=""
                  searchFor="searchFor"
                  :fields="tableColumns" ,
                  :sort-order="sortOrder"
                  :multi-sort="multiSort"
                  table-class="table table-striped table-hover table-condensed table-font"
                  ascending-icon="glyphicon glyphicon-chevron-up"
                  descending-icon="glyphicon glyphicon-chevron-down"
                  :append-params="moreParams" pagination-class=""
                  pagination-info-class=""
                  pagination-component-class=""
                  pagination-info-no-data-template="The requested query return no result"
                  :per-page="perPage"
                  :append-params="moreParams"
                  wrapper-class="vuetable-wrapper "
                  table-wrapper=".vuetable-wrapper"
                  loading-class="loading"
                  detail-row="makeDetailRow"
                  detail-row-id="id"
                  detail-row-transition="expand"
                  row-class-callback="rowClassCB"
        >
</vuetable>

and a script

export default {
        props: {},

        data() {
            return {
                searchFor: '',
                sortOrder: [{
                    field: 'id',
                    direction: 'desc'
                }],
                moreParams: [],
                multiSort: true,
                perPage: 30,
                paginationComponent: 'vuetable-pagination',
                paginationInfoTemplate: 'Displaying {from} to {to} of {total} items',
                tableColumns: [
                    {
                        name: 'properties',
                        title: '',
                        titleClass: 'center aligned',
                        dataClass: 'center aligned',
                        callback: 'showDetailRow'
                    },
                    {
                        name: 'id',
                        title: 'ID',
                        sortField: 'id',
                        titleClass: 'center aligned',
                        dataClass: 'center aligned'
                    },
                    {
                        name: 'log_name',
                        title: 'Log',
                        sortField: 'log',
                        titleClass: 'left aligned',
                        dataClass: 'left aligned'
                    },
                    {
                        name: 'description',
                        title: 'Description',
                        sortField: 'description',
                        titleClass: 'left aligned',
                        dataClass: 'left aligned'
                    },
                    {
                        name: 'subject_id',
                        title: 'Subject ID',
                        titleClass: 'center aligned',
                        dataClass: 'center aligned'
                    },
                    {
                        name: 'subject_type',
                        title: 'Subject Type',
                        titleClass: 'left aligned',
                        dataClass: 'left aligned'
                    },
                ]
            }
        },

        watch: {
            'perPage': function (val, oldVal) {
                this.$broadcast('vuetable:refresh')
            }
        },

        methods: {
            /**
             * Callback functions
             */
            showDetailRow: function (value) {
                var icon = this.$refs.vuetable.isVisibleDetailRow(value) ? 'glyphicon glyphicon-minus-sign' : 'glyphicon glyphicon-plus-sign'

                return [
                    '<a class="show-detail-row">',
                    '<i class="' + icon + '"></i>',
                    '</a>'
                ].join('')

            },
           makeDetailRow: function (data) {
                return [
                    '<td colspan="7">',
                    '<div class="detail-row">',
                    '<div class="form-group">',
                    '<label>Properties: </label>',
                    '<ul><li v-for="new_list in data.properties.new_attributes">{{ new_list.$key }} - {{ new_list.$value }}</li></ul>',
                    '<ul><li v-for="old_list in data.properties.old_attributes">{{ old_list.$key }} - {{ old_list.$value }}</li></ul>',
                    '</div>',
                    '</div>',
                    '</td>'
                ].join('')

Sorry, a real Noob with Vue.JS, just learning and not sure where to go to next..

My Actions keep reloading the page

Dont know what i have done but since i have been trying to working this out but in vain.
i have followed everything done in the example

Style in Vuetable.vue

Question:

This Style is in the Vuetable.vue is it mandatory?

At this moment I can overright it.

<style> .vuetable th.sortable:hover { color: #2185d0; cursor: pointer; } .vuetable-actions { width: 15%; padding: 12px 0px; text-align: center; } .vuetable-pagination { background: #f9fafb !important; } .vuetable-pagination-info { margin-top: auto; margin-bottom: auto; } </style>

Sorting and | for sort order.

My API doesn't use | seperator for sort order, this should be an option not a requirement (It's added even if direction: '' is empty.

Redraw table with new fields (columns) after any query to server

I'm add object columns to json responce: {data, links, +columns}
Fields (columns) and data - contains data with identical fields (columns), but columns can vary...

I'm try:

events: {
            'vuetable:load-success': function (response) {
                this.$set('columns', response.data.columns);
                //this.$children[0].$broadcast('vuetable:refresh');

                        // in this place I need method for redraw table...
            }
}

It's possible?

Thank you!

Adding checkboxes to vuetable rows

I would like to add a checkbox on the left of each row, allowing the user to select multiple rows at a time, similar to this.

I am aware of the actions buttons generated via the __action field - that is a great feature, and I suppose one could use them to somehow select the rows on a click event. However, the UI for those is a button tag and I would prefer to have a regular column of checkboxes (in addition the to the buttons as well).
Is it possible to add something like this to vuetable?

Performance in Chrome

For some reason chrome gets stuck in search, It reacts after 5 to 10 seconds but it is strange.

Tested in firefox dev and all went well .

Slow table update with 200+ rows

Hello,

I'm displaying 200 rows / 16 columns per page and table updates very slow.
It takes about 2-3 seconds to update the table when I'm calling 'vuetable:refresh'.

Is there any way to make it faster?
Any way to use track-by with v-for?

I need refresh the table every 5-10s, and its really annoying that it takes 2-3-4s to rerender the table.

Access data from other field on callback

Hi!

I'm getting the rows of the database in vue table, but I need to get the data from other row here an example:

{
                name: 'Breed',
                title: Vue.t('message.class'),
                callback: 'class',
                dataClass: 'text-center',
                titleClass: 'text-center',
}, {
                name: 'Sex',
                title: Vue.t('message.sex'),
                callback: 'sex',
                dataClass: 'text-center',
                titleClass: 'text-center',
}

This the code I have:

class: function(data) {
            return '<img src="/template/img/ladder/heads/' + data + '_1.png" width="30">'
        },

I need to do this:

class: function(data) {
            return '<img src="/template/img/ladder/heads/' + data + '_'+ Sex + '.png" width="30">'
        },

Thanks.

(Sorry I'm not native english speaker)

How to access an instance of a particular vuetable?

capture

  1. when i select a region, the districts table should reload with the selected region's districts
  2. the same process applies to the district table and the locations.

i bound the tables api-url to a computed property for each one of them so that anytime the selected item changes the url updates.
after that i was trying to reload the related table(s) , but it only reloads the table on which the event occurred.

any help?

How can i call data with callback?

How can i call other field's data ? I want to get data.name.

var tableColumns = [
            {
                name: 'name',
                sortField: 'name',
            },
            {
                name: 'test',
                sortField: 'test',
                callback: 'testfunc',
            },

and this

testfunc: function (data) {
                    return 'Hello '+ data.name + ' welcome';
                },

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.