Parcourir la source

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

Igor Vaynberg il y a 12 ans
Parent
commit
4482c2af85
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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
         // single
         val: function () {
         val: function () {
-            var val, triggerChange = true, data = null, self = this;
+            var val, triggerChange = false, data = null, self = this;
 
 
             if (arguments.length === 0) {
             if (arguments.length === 0) {
                 return this.opts.element.val();
                 return this.opts.element.val();
@@ -2310,7 +2310,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
 
         // multi
         // multi
         val: function () {
         val: function () {
-            var val, triggerChange = true, data = [], self=this;
+            var val, triggerChange = false, data = [], self=this;
 
 
             if (arguments.length === 0) {
             if (arguments.length === 0) {
                 return this.getVal();
                 return this.getVal();