Angular-slickgrid不显示自定义标题菜单项文本(仅标题菜单项图标可见)

时间:2019-11-28 11:19:25

标签: javascript angular slickgrid

我在angular应用程序中使用了angular-slickgrid,我想在headermenu中添加更多菜单项。 下面是我正在使用的代码:

 column.header = {
    menu: {
      items: [
        // add Custom Header Menu Item Commands at the bottom of the already existing internal custom items
        // you cannot override an internal command but you can hide them and create your own
        // also note that the internal custom commands are in the positionOrder range of 50-60,
        // if you want yours at the bottom then start with 61, below 50 will make your command(s) on top
        {
          iconCssClass: 'fa fa-question-circle',
          disabled: (column.id === 'effort-driven'), // you can disable a command with certain logic
          titleKey: 'GROUP', // use "title" as plain string OR "titleKey" when using a translation key
          command: 'group',
          positionOrder: 61
        }
      ]
    }
  };

在运行该应用程序时,以上标题菜单项仅显示图标,没有文本。 enter image description here

1 个答案:

答案 0 :(得分:0)

答案很可能是在评论中

titleKey: 'GROUP', // use "title" as plain string OR "titleKey" when using a translation key

titleKey是当您使用翻译并且​​很可能没有该翻译的时候。您应该只将title与常规文本一起使用,并且应该可以正常工作