Editable ComboBox using bootstrap/angularjs

后端 未结 4 1858
长情又很酷
长情又很酷 2021-02-04 04:14

I am not getting any solution for having combobox as select as well as input. That means if user selection in not there in per-populated list , then use should be able to enter

4条回答
  •  旧时难觅i
    2021-02-04 04:55

    I also was looking for the same thing and didn't find a good solution, so I ended up creating angular-combo-box directive which lets you do what you are looking for. Here's an example.

    angular.module('ngComboBoxExample', ['ngComboBox'])
      .controller('myController', function($scope) {
        $scope.options = [
          'Blue',
          'Red',
          'Pink',
          'Purple',
          'Green'
        ];
        $scope.color = '';
      });
    
    
    
    
    Selected Color:

    Hope it helps!

提交回复
热议问题