Vuetable-2: Edit cell(s)?

Created on 5 Sep 2017  路  5Comments  路  Source: ratiw/vuetable-2

Is there a plan to ad support for editing cell (or multiple cells at same) values with a callback for handling save logic?

Most helpful comment

You can implement an editable input component and use Vuetable's __component special field to use that component.

All 5 comments

No real plan for that. As I use dedicated modal window for adding/editing data in the row.

Modal is then almost the same as opening a new page with edit form for that record...

We are developing a business application which relies heavily on tables. There is often a need to update some columns on a group (multiple) of records. Doing this by opening modal/page to edit a record is very time consuming operation.

Thats why in-line editing in table comes in very handy. Even selecting group of records in column and edit more at once is very nifty feature.

For example here you can see out Angular grid component which is used in our client application and shows similar editing functionalities >> https://www.youtube.com/watch?v=On9eSj_4xzo.

I don't say we need everything but the editing would be 馃憤.

You can implement an editable input component and use Vuetable's __component special field to use that component.

You can also do that using the __slot option and add handlers to save the data

This works for me

<template>
    <vuetable ref="vuetable"
              :api-mode="false"
              :data=gridData
              :fields="fields"
    >

        <template slot="inputField" scope="props">
            <div class="custom-actions">
                <input/>
            </div>
        </template>

    </vuetable>
</template>
<script>
    import Vuetable from 'vuetable-2'

    export default {
        components: {
            Vuetable
        },
        data() {
            return {
                gridData : [
                    {
                    id:1,
                    }
                ],
                fields: [
                    {
                        name: '__slot:inputField',
                        title: 'Input Field'
                    }
                ]
            }
        }

    }
</script>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

hanxue picture hanxue  路  3Comments

jdriesen picture jdriesen  路  4Comments

chrislandeza picture chrislandeza  路  3Comments

mannyyang picture mannyyang  路  3Comments

mix359 picture mix359  路  5Comments