vue-editortable icon indicating copy to clipboard operation
vue-editortable copied to clipboard

Get data from array instead of URL

Open h1995 opened this issue 6 years ago • 3 comments

How to assign Data from an Array . Just like Iview Table ? I dont want to use direct URL to get Data

h1995 avatar Feb 14 '18 12:02 h1995

That would be really awesome.

solovieff avatar Mar 05 '18 18:03 solovieff

At the moment you can pass your data like this:

const values = {
    data:
    [
      {
        id: 159,
        name: 'Marilou Cummings',
        email: '[email protected]',
        password: '$2y$10$wCbmGt9rvMTBsMAR5Ibj/.for8pAEzW5vHZ/LzRSpj2UPgWG2/dJ2',
        firstname: 'Claudie',
        lastname: 'Spencer',
        address: '307 Stanton View Apt. 799',
        city: 'Hillschester',
        zip: '80117-5857',
        state: 'Montana',
        country: 'Saint Helena',
        gender: 'female',
        age: 59,
        birthday: '2001-08-14',
        married: 1,
        num1: 93,
        num2: 96,
        num3: 28,
        num4: 68,
        num5: 65,
        title: 'Assumenda necessitatibus aut in et est.',
        remember_token: 'DDEY65Q5gv',
        created_at: '2017-03-10 11:30:07',
        updated_at: '2017-03-10 11:30:07',
      },
      {
        id: 159,
        name: 'Marilou Cummings',
        email: '[email protected]',
        password: '$2y$10$wCbmGt9rvMTBsMAR5Ibj/.for8pAEzW5vHZ/LzRSpj2UPgWG2/dJ2',
        firstname: 'Claudie',
        lastname: 'Spencer',
        address: '307 Stanton View Apt. 799',
        city: 'Hillschester',
        zip: '80117-5857',
        state: 'Montana',
        country: 'Saint Helena',
        gender: 'female',
        age: 59,
        birthday: '2001-08-14',
        married: 1,
        num1: 93,
        num2: 96,
        num3: 28,
        num4: 68,
        num5: 65,
        title: 'Assumenda necessitatibus aut in et est.',
        remember_token: 'DDEY65Q5gv',
        created_at: '2017-03-10 11:30:07',
        updated_at: '2017-03-10 11:30:07',
      },
    ],
  };

And then: <vue-editortable :data="{ values }"></vue-editortable>

Don't ask me why i did it like this, it was at the very beginning and i was actually planing to remove it.

Furthermore i have to say, that there are still a lot of bugs, especially when filtering & sorting. But i'm not going to work on these issues cause i have decided to restart from scratch. The reason is that there are some things i can't do like it is build atm. So i have to change some things of the core functionality.

I actually wanted to have this finished some weeks ago, but i really don't get the time to work on this project.

el-jacko avatar Mar 09 '18 21:03 el-jacko

Really liking the simplicity of your code & really looking forward to what you come up with in this space. There's a whole lot of vue-based datatable projects out there, but yours is definitely my favourite for it's speed & small codebase. Thank you.

ceenz avatar Mar 31 '18 07:03 ceenz