Can't select item in list created by ui-select2

后端 未结 3 1717
别那么骄傲
别那么骄傲 2021-02-13 20:47

In my HTML I have this line:


3条回答
  •  春和景丽
    2021-02-13 21:03

    Although this isn't really specified in the select2 documentation, you'll need to pass an id key with a function value to select2.

    $scope.privsSelect2options = {
        id: function(element) { return element.name; }
        ...
    }; 
    

提交回复
热议问题