0

hello i didnt have any example to try this method.. can any one give me some little example for take 1 row value from datatable (onclick) selected row on vue js.

this is my template table

<template>
<div class="table-responsive">
 <datatable title="" :rows="tableData" :columns="columndata" :options="options"></datatable>
</div>
</template>

and this is my javascript

export default { 
   data(){
     return {
       columns: ['id', 'name', 'age'],
      tableData: [
          { id: 1, name: "John", age: "20" },
          { id: 2, name: "Jane", age: "24" },
          { id: 3, name: "Susan", age: "16" },
          { id: 4, name: "Chris", age: "55" },
          { id: 5, name: "Dan", age: "40" }
      ],
      options: {
          // see the options API
      }
   }
}
2
  • What package do you use as datatable? Commented Jan 31, 2018 at 9:37
  • @ThomasKleßen bootstrap-vue and vue-tables-2 Commented Feb 1, 2018 at 5:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.