Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add custom action button - ng2-smart-table

I'm trying to add a button to custom action, but a new column is not added in the action, making the button overlap with the others.

Code:

settings = {
    actions: {
      custom: [
        {
          name: 'Button',
          title: 'Button ',
        }
      ],
    },
    columns: {
      name: {
        title: 'Full name'
      },
      email: {
        title: 'Email'
      },
      lastLogin: {
        title: 'Last Login'
      }
    }
  };

I needed to put a link to the image, because I have little reputation here and the image tool is blocked for me.

reaction image:

What am I doing wrong?

like image 831
Leticia Fatima Avatar asked Aug 29 '18 21:08

Leticia Fatima


Video Answer


1 Answers

There is one another css to align items,

    ::ng-deep {
      ng2-st-tbody-edit-delete {
        display: none;
        height: 0 !important;
      }
    
      ng2-st-tbody-custom {
        display: flex;
        text-align: center;
      }
    }`
like image 72
payal asodariya Avatar answered Oct 31 '22 08:10

payal asodariya