Browse Source

by default do not trigger change from val. #771 #619

Igor Vaynberg 12 năm trước cách đây
mục cha
commit
4482c2af85
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -1757,7 +1757,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
         // single
         val: function () {
-            var val, triggerChange = true, data = null, self = this;
+            var val, triggerChange = false, data = null, self = this;
 
             if (arguments.length === 0) {
                 return this.opts.element.val();
@@ -2310,7 +2310,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
         // multi
         val: function () {
-            var val, triggerChange = true, data = [], self=this;
+            var val, triggerChange = false, data = [], self=this;
 
             if (arguments.length === 0) {
                 return this.getVal();