ng-selectize icon indicating copy to clipboard operation
ng-selectize copied to clipboard

optgroups not showing

Open jdarnok opened this issue 10 years ago • 0 comments

Hey! I have a problem with adding optgroup functionality. It's not showing when clicking on select. My config looks like this:

$scope.tests = [{id: 1, name: 'one', parent: 'first'}, {id: 2, name: 'two', parent: 'second'}]
$scope.groups =  [{ id: 'dom', name:'test' }]
  $scope.config = {
    valueField: 'id',
    labelField: 'name',
    searchField: ['name'],
    allowEmptyOption: false,
    optgroups: $scope.groups
    optGroupField: 'parent',
    optgroupLabelField: 'name',
    optGroupValueField: 'id',
    plugins: ['optgroup_columns']
  }

And on view: <select selectize="config" class="form-control" options="tests" ng-model="test"> </select>

Is there a possibility to use ng-options? because it's throwing errors when trying to replace "options".

jdarnok avatar Feb 21 '16 12:02 jdarnok