瀏覽代碼

checked for existing pickedItems

tags/0.1.11
Robin Thoni 8 年之前
父節點
當前提交
373c2c6e0a
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/lupickertable.js

+ 3
- 1
src/lupickertable.js 查看文件

@@ -16,7 +16,9 @@ angular.module('luticateUtils')
16 16
 
17 17
                     $scope.pickerOptions = $scope.options();
18 18
                     $scope.pickerOptions.luPickerTableScope = $scope;
19
-                    $scope.pickerOptions.pickedItems = [];
19
+                    if ($scope.pickerOptions.pickedItems == null) {
20
+                        $scope.pickerOptions.pickedItems = [];
21
+                    }
20 22
 
21 23
                     var onItemClicked = $scope.pickerOptions.onItemClicked;
22 24
                     $scope.pickerOptions.onItemClicked = function(item)

Loading…
取消
儲存