Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // header menu items
  2.     this.getMainMenuItems = function getMainMenuItems(params) {
  3.       if (params.column.getId() !== 'actions') {
  4.         // const menuItems = [];
  5.         const menuItems = [
  6.           {
  7.             name: 'Sort ASC',
  8.             action: function() {
  9.               console.log('asc');
  10.             }
  11.           },
  12.           {
  13.             name: 'Sort DESC',
  14.             action: function() {
  15.               console.log('desc');
  16.             }
  17.           },
  18.         ];
  19.  
  20.         return menuItems;
  21.       }
  22.  
  23.       return params.defaultItems;
  24.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement