Angular ui-grid 中 HeaderCell 的箭头

Arrow from HeaderCell in Angular ui-grid

我需要知道是否可以从 Angular ui-grid(如下所示)的 headercell 中删除向下的 V 形箭头:

因为下拉列表中的升序排序和降序排序 selection 与单击网格中的列标题时的排序行为不同。单击列标题会自动覆盖之前的任何排序,而从下拉列表中 select 按升序或降序排序要求用户 selects "Remove Sort" 在 select 另一列之前。我的 QA 团队要求我 "remove" 它,因为他们担心如果不先尝试 select 另一个 Sort Asc/Desc ,这会让用户认为排序功能有问题单击删除排序。如果无法删除箭头,是否至少可以从 selection 中删除升序排序和降序排序而不阻止使用列标题进行排序?

为了从下拉菜单中删除升序排序、降序排序和删除排序,我在 ui-grid.js 文件中注释掉了以下内容:

  //{
        //  title: i18nService.getSafeText('sort.ascending'),
        //  icon: 'ui-grid-icon-sort-alt-up',
        //  action: function($event) {
        //    $event.stopPropagation();
        //    $scope.sortColumn($event, uiGridConstants.ASC);
        //  },
        //  shown: function () {
        //    return service.sortable( $scope );
        //  },
        //  active: function() {
        //    return service.isActiveSort( $scope, uiGridConstants.ASC);
        //  }
        //},
        //{
        //  title: i18nService.getSafeText('sort.descending'),
        //  icon: 'ui-grid-icon-sort-alt-down',
        //  action: function($event) {
        //    $event.stopPropagation();
        //    $scope.sortColumn($event, uiGridConstants.DESC);
        //  },
        //  shown: function() {
        //    return service.sortable( $scope );
        //  },
        //  active: function() {
        //    return service.isActiveSort( $scope, uiGridConstants.DESC);
        //  }
        //},
        //{
        //  title: i18nService.getSafeText('sort.remove'),
        //  icon: 'ui-grid-icon-cancel',
        //  action: function ($event) {
        //    $event.stopPropagation();
        //    $scope.unsortColumn();
        //  },
        //  shown: function() {
        //    return service.sortable( $scope ) &&
        //           typeof($scope.col) !== 'undefined' && (typeof($scope.col.sort) !== 'undefined' &&
        //           typeof($scope.col.sort.direction) !== 'undefined') && $scope.col.sort.direction !== null &&
        //          !service.suppressRemoveSort( $scope );
        //  }
        //},

现在,下拉菜单中唯一显示的是 "Hide Column"。这解决了我的问题。

希望这对其他人有帮助!