ng-selectize
ng-selectize copied to clipboard
optgroups not showing
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".