Changeset 1726


Ignore:
Timestamp:
2010-10-04 15:16:27 (3 years ago)
Author:
mpo
Message:

fixes #376
selection controls in multivalue mode are capable of having nothing selected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/basic-controls.js

    r1607 r1726  
    367367         
    368368        if (value === undefined  // if no matches left after trim  
    369                 && values !== undefined && values.length > 0 // and there are actual options               
    370                 && $.valueInArray(undefined,values) < 0) { //and undefined itself is not somewhere in the list 
     369            && values !== undefined && values.length > 0 // and there are actual options               
     370            && $.valueInArray(undefined,values) < 0 //and undefined itself is not somewhere in the list 
     371            && ! this.getType().multivalue ) { // unless this is a multivalue selector: those ARE capable of having nothing selected  
    371372            value = values[0]; //then we need to pick the first value, since that is what the control will show 
    372373        } 
Note: See TracChangeset for help on using the changeset viewer.