Add button action in q-table



  • Hello everyone
    I need to add an action button to my table, but it doesn’t show in the final result

    <q-table
            dense
            :data="AppGroupUserList"
            :columns="columns"
            row-key="USR_ERP_ID"
            separator="horizontal"
             :visible-columns="visibleColumns"
          >
            <template v-slot:top-right>
              <q-btn color="primary" icon-right="delete_forever" no-caps />
            </template>
            <template v-slot:body-cell-action="props">
              <q-td :props="props">
                <q-btn
                  color="negative"
                  icon-right="delete"
                  no-caps
                  flat
                  dense
                  @click="deleteval(data.indexOf(props.row))"
                />
              </q-td>
            </template>
          </q-table>
    
    
    
    
    

    btn-delete.jpg



  • I answer myself
    add in columns:

    { name: 'action', label: 'Action', field: 'action' }
    

Log in to reply