example/dist/production.js
function() {
                        // Get an array of the currently selected values
                        var value = this.get(),
                            currentValue = this.options.value();

                        // If the compute is a string, set its value to the joined version of the values array (i.e. "foo;bar")
                        if (this.isString || typeof currentValue === "string") {
                            this.isString = true;
                            this.options.value(value.join(this.delimiter));
                        }
                        // If the compute is a can.List, replace its current contents with the new array of values
                        else if (currentValue instanceof can.List) {
                            currentValue.attr(value, true);
                        }
                        // Otherwise set the value to the array of values selected in the input.
                        else {
                            this.options.value(value);
                        }

                    }
function() {
                        // Get an array of the currently selected values
                        var value = this.get(),
                            currentValue = this.options.value();

                        // If the compute is a string, set its value to the joined version of the values array (i.e. "foo;bar")
                        if (this.isString || typeof currentValue === "string") {
                            this.isString = true;
                            this.options.value(value.join(this.delimiter));
                        }
                        // If the compute is a can.List, replace its current contents with the new array of values
                        else if (currentValue instanceof can.List) {
                            currentValue.attr(value, true);
                        }
                        // Otherwise set the value to the array of values selected in the input.
                        else {
                            this.options.value(value);
                        }

                    }
function ( ) { // Get an array of the currently selected values var value = this . get ( ) , currentValue = this . options . value ( ) ; // If the compute is a string, set its value to the joined version of the values array (i.e. "foo;bar") if ( this . isString || typeof currentValue === "string" ) { this . isString = true ; this . options . value ( value . join ( this . delimiter ) ) ; } // If the compute is a can.List, replace its current contents with the new array of values else if ( currentValue instanceof can . List ) { currentValue . attr ( value , true ) ; } // Otherwise set the value to the array of values selected in the input. else { this . options . value ( value ) ; } }
Called when the user changes this input in any way.
Called when the user changes this input in any way .