Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SelectItem with specialValues / sortField / filter - bug

    Hello,

    I am trying to use specialValues with sortField set in a SelectItem with the filter editor showing. When entering something in the filter, the specialValues don't stay on top of the list but are sorted as well.

    SmartClient version: v10.1p_2016-05-14/PowerEdition Deployment
    Browser: Chrome 50.0.2661.102 m

    Test case:
    Code:
    var dsFolder = DataSource.create({ fields: [{name: 'id'},{name: 'name'}], cacheData:[
        {id: 1, name: "Folder 1"},
        {id: 2, name: "Folder 2"},
        {id: 3, name: "Folder 3"}
    ], clientOnly:true});
    
    isc.DynamicForm.create({
        width: 500,
        numCols:4,
        fields : [{
            name: "filteredSelect", title: "Choose an item (Select)", editorType: "SelectItem",
            optionDataSource: dsFolder,
            displayField:"name", valueField:"id",
            pickListWidth:300,
            pickListProperties: {
                showFilterEditor:true
            },
            pickListFields:[
                {name:"name"}
            ],
            specialValues: { "**emptyValue**": "None", "-1": "Not Applicable" },
            sortField:'name'
        }]
    }).show();
    To reproduce: type 'f' into the filter editor and 'None' and 'Not Applicable' move to the end of the list.

    Thanks.
Working...
X