title: Adding a Button to VUE datatables
body: <p>I looking to add a button to each row in a datatable component in VUE 2</p>
  
  <p>Currently data is feeding from axios request as per below</p>
  
  <pre><code>axios.get('workers/viewall').then(response =&gt; this.workerslist = response.data);
  </code></pre>
  
  <p>Added a prop in the Datatable.vue to give customButtons = True</p>
  
  <pre><code> customButtons: {
              default: true
          },
  </code></pre>
  
  <p>And added the below to my Vue file</p>
  
  <pre><code>customButtons: {
              hide: false,
              icon: 'search',
              onclick: function (user_id) {
                  this.$router.push({
                      name: 'edit_worker',
                      params: {user_id: user_id}
                  });
              },
          },
  </code></pre>
  
  <p>Which is put into the data component here: </p>
  
  <pre><code>data: function () {
           return {
              workerslist: [],
  </code></pre>
  
  <p>and then column data is as follows:</p>
  
  <pre><code>columndata: [{
                  label: 'ID',
                  field: 'id',
                  numeric: true,
                  html: false,
              },{
                  label: 'First name',
                  field: 'fname',
                  numeric: true,
                  html: false,
              }, {
                  label: 'Surname',
                  field: 'sname',
                  numeric: false,
                  html: false,
              }, {
                  label: 'Date of Birth',
                  field: 'dob',
                  numeric: false,
                  html: false,
              }, {
                  label: 'Gender',
                  field: 'gender',
                  numeric: true,
                  html: false,
              }, {
                  label: 'Trade',
                  field: 'trade',
                  numeric: false,
                  html: false,
              }, {
                  label: 'Nationality',
                  field: 'nationality',
                  numeric: false,
                  html: true,
              }, {
                  label: 'Telephone',
                  field: 'telephone',
                  numeric: false,
                  html: true,
              }, {
                  label: 'Mobile',
                  field: 'mobile',
                  numeric: false,
                  html: true,
              }, {
                  label: 'Created',
                  field: 'created_at',
                  numeric: false,
                  html: true,
              },{
                  label: 'Edit',
                  field: 'edit',
                  numeric: false,
                  html: true,
                  }],
  </code></pre>
  
  <p>It just has to put a button to have a click through at the end of each row</p>