# Table select

  • Rows can be selectable by making first column as a selectable column. To perform selections you need to use uid, select and row-events attributes.
  • values inside tradingsymbol are unique so that we added it to uid. and it prevents from selecting same elements multiple times.

# Usage

<template>
  <div>
    <su-table :headers="dataHoldingsHeader" :data="dataHoldings" :uid="uid" row-events select @selected="onSelect">
      <template slot-scope="props">
        <td>
          {{ props.row.tradingsymbol }}
        </td>
        <td>
          {{ props.row.collateral_value }}
        </td>
        <td>
          {{ props.row.pledge_qty }}
        </td>
        <td>
          {{ props.row.loan_value }}
        </td>
      </template>
    </su-table>
  </div>
</template>

<script>
export default {
  components: {
    "su-table": DataTable
  },
  data () {
    return {
      // values inside 'tradingsymbol' are unique. and it prevents from selecting same elements multiple times.
      uid: "tradingsymbol",
      // headers and data arrays are available in the table introduction section
      dataHoldingsHeader: headers,
      dataHoldings: data
    }
  },
  methods: {
    onSelect (value) {
      console.log('value as array ', value)
    }
  }
}
</script>
Symbol Max available (₹) Pledge Qty Amount required (₹)
QUICKHEAL 127 1 253.25
UPL 367 1 734.85
L&TFH 165 2 330.9
AXISBANK 3506 11 7011.4
WONDERLA 155 1 309.15
IDFCBANK 22 1 44.9