Using an ng-option dropdown in a ui-grid editableCellTemplate [ng-grid 3.x]

前端 未结 4 1858
一整个雨季
一整个雨季 2021-01-02 08:42

I\'m using ng-grid\'s new 3.0 release ui-grid to make a grid in my application. What i\'m trying to do is make one of the editable cells in my table an ng-o

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-02 09:06

    You can in fact use editDropdownOptionsArray. It's perfectly possible to edit it after initialisation!

    $scope.someFunction = function(){
      $scope.coulmnDefs.columnDefs[1].editDropdownOptionsArray = [
        {
          title: 'Some changed option',
          value: 'opt1'
        },
        {
          title: 'Some other changed option',
          value: 'opt2'
        }
      ]
    }
    

提交回复
热议问题