Announcement

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

    Cannot show grid with Filter Editor when a read-only form is present with a FileItem field

    Please try the following code in the latest Feature Explorer in the latest Chrome version:
    - The grid with showFilterEditor set to true is initially hidden. The form is visible and has canEdit set to true.
    - Click the "Make Read-only" button to set canEdit to false on the form.
    - Click the "Show Grid" button to show the grid.
    - The grid does not show and a JavaScript error is logged to the Console:
    Uncaught TypeError: Cannot read property 'tabIndexUpdatedCallback' of undefined

    Code:
    isc.ListGrid.create({
        ID: "countryListGrid", width:500, height: 150,  alternateRecordStyles:true,    dataSource: countryDS,
        fields: [
            { name: "countryName" }, { name: "continent" }, { name: "capital" }, { name: "countryCode" }
        ],
        showFilterEditor: true, filterOnKeypress: false, autoFetchData: true, visibility: "hidden"
    });
    
    isc.DynamicForm.create({
        ID: "testForm", width: 10, canEdit: true, canFocus: false, numCols: 2, colWidths: [ 5, 5 ],
        fields: [
            {    name: "logoFileButton",
                type: "file",
                accept: ".png",
                showFocused: false,
                title: "File"
            }   
        ]
    });
    
    isc.Button.create({
        ID: "disableFormButton", title: "Make Read-only",
        click: function() {
            testForm.setCanEdit(false);
        }
    });
    
    isc.Button.create({
        ID: "showGridButton", title: "Show Grid",
        click: function() {
            countryListGrid.show();
        }
    });
    
    isc.HLayout.create({
        ID: "buttonLayout", layoutMargin:5,  membersMargin: 10,
        members: [ disableFormButton, showGridButton ]
    });
    
    isc.VLayout.create({
        ID: "contentLayout",
        members: [ buttonLayout, countryListGrid, testForm ]
    });
    Browsers: Chrome 84 and IE 11
    SmartClient versions: 11.1 and 12.1
    (We use Chrome and SmartClient v11.1p_2020-05-30/PowerEdition in our production code.)
Working...
X