【问题标题】:Angular-slickgrid is not showing custom headermenu item text(Only headermenu item icon is visible)Angular-slickgrid 不显示自定义标题菜单项文本(仅标题菜单项图标可见)
【发布时间】:2019-11-28 11:19:25
【问题描述】:

我在 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
        }
      ]
    }
  };

在运行应用程序时,上面的标题菜单项只有图标可见,没有文字。附加的屏幕截图:

【问题讨论】:

标签: javascript angular slickgrid


【解决方案1】:

答案很可能在评论中

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

titleKey 是当您使用翻译并且​​您很可能没有该翻译时。您应该将title 与常规文本一起使用,这样就可以了

【讨论】:

  • 是的,那是我的错误,我不应该评论标题
猜你喜欢
  • 1970-01-01
  • 2020-03-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多