$scope.getData = $scope.afFieldset.getData;
$scope.getOptions = function() {
- return _.transform($scope.defn.options, function(result, val, key) {
- result.push({id: key, text: val});
- }, []);
+ return {
+ results: _.transform($scope.defn.options, function(result, val, key) {
+ result.push({id: key, text: val});
+ }, [])
+ };
};
$el.addClass('af-field-type-' + _.kebabCase($scope.defn.input_type));
-<input crm-ui-select="{data: getOptions(), multiple: defn.input_attrs.multiple}" id="{{ fieldId }}" ng-model="getData()[fieldName]" />
+<input crm-ui-select="{data: getOptions, multiple: defn.input_attrs.multiple}" id="{{ fieldId }}" ng-model="getData()[fieldName]" />