有条件地根据同一行中单元格中的值更改行中的按钮

时间:2017-11-15 06:27:37

标签: ng2-smart-table

所以我的方案是在操作列中有一个“编辑”,“激活”,“取消激活”按钮。 并且有一个名为Status的列,其值将为“ACTIVE”或“INACTIVE” 有没有办法可以根据状态栏enter image description here中的值显示和隐藏这些操作按钮 我必须在这个附加的屏幕截图中实现类似的东西

  settings = {
columns: {
  Status: {
    title: 'Status'
    , class: 'align-centerr'
  },
  FullName: {
    title: 'Full Name'
  },
  JobTitle: {
    title: 'Job Title'
  },
  Department: {
    title: 'Department'
  },
  EmailAddress: {
    title: 'Email Address'
  },
  MobilePhone: {
    title: 'Mobile No'
  },


},
actions: {
  edit: false,
  // custom:[{}]
  custom: [{ name: 'Edit', title: `<i  class="fa fa-edit"></i>` },
    { name: 'Activate', title: `<i class="fa fa-toggle-on"></i>` },
    { name: 'Deactivate', title: `<i  class="fa fa-toggle-off"></i>` }
  ],

},


delete: {
  deleteButtonContent: '',
  confirmDelete: true
},
add: null,
defaultStyle: false

0 个答案:

没有答案