Announcement

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

  • 11.1p+ Cosmetic ListGrid Field selection issue with long titles

    Hi Isomorphic,

    please see this modified sample (v11.1p_2018-11-24), which mimics my application, where I have many fields and also long titles.
    As you can see, the field selection sub menu has an unneeded horizontal scrollbar.

    Code:
    function createFields (fieldCount) {
        var fields = [];
        for(var i = 1; i <= fieldCount; i++) {
            fields.add({name: "field" + i, title: "A very long field title " + i, showIf: "false"});
        }
        return fields;
    }
    
    function createRecords (recordCount, fields) {
        var records = [];
        for (var i = 0; i < recordCount; i++) {
            var record = {};
            for (var j = 0; j < fields.length; j++) {
                record[fields[j].name] = "Row " + i + ", Value " + (j+1);
            }
            records.add(record);
        }
        return records;
    }
    
    function getOrderedFields(fields) {
        var initialFieldIndices = [ 20, 5, 197, 59, 17, 120, 152, 91, 37, 101, 40, 9, 174, 29, 163 ],
            i, orderedFields = [];
    
        for (i = 0; i < initialFieldIndices.length; i++) {
            var field = fields.find("name", "field" + initialFieldIndices[i]);
            orderedFields.add(field);
            delete field.showIf;
        }
    
        for (i = 0; i < fields.length; i++) {
            var field = fields[i];
            if (field.showIf != null) orderedFields.add(field);
        }
    
        return orderedFields;
    }
    
    var fields = createFields(200);
    
    isc.ListGrid.create({
        ID: "pickableFields",
    advancedFieldPickerThreshold: 201,
        autoFitData: "both",
        autoFitMaxRecords: 20,
        autoFitMaxColumns: 8,
        autoFitFieldWidths: true,
        canEditTitles: true,
    
        useAdvancedFieldPicker: true,
        fieldPickerFieldProperties: [ "frozen" ],
    
        fields: getOrderedFields(fields),
        data: createRecords(20, fields),
    
        alternateRecordStyles: true,
        alternateFieldStyles: true
    });
    Click image for larger version

Name:	Scrollbar.png
Views:	1
Size:	69.8 KB
ID:	256027

    Best regards
    Blama

  • #2
    The Framework manually configures the width of menus that are tall enough to need vertical scrolling, but it wasn't being set properly. We've fixed it in SC 10.1p+, and the fix will be in the nightly builds dated 2018-12-04 and beyond.

    Comment


    • #3
      Hi Isomorphic,

      I can see that this is fixed in the online showcase using v11.1p_2018-12-04 / v12.0p_2018-12-04.

      Thank you & Best regards
      Blama

      Comment


      • #4
        Hi Isomorphic,

        just to confirm, this is fixed in my application as well.

        Best regards
        Blama

        Comment

        Working...
        X