Ui Grid angular Column name行极高

时间:2016-06-21 11:40:14

标签: javascript angularjs twitter-bootstrap

我在一个从IFrame内部调用的bootstrap模式中显示ui网格。问题是列名称行呈现90%高度,为数据留下一行。我不知道为什么会这样。这是一张照片: enter image description here

我在Typescript中的代码:

constructor(....){
//... other code
this.resultGrid = {
            enableRowSelection: true,
            enableRowHeaderSelection: false,
            enableHorizontalScrollbar: 0,
            enableSorting: true,
            columnDefs: [
                { name: 'Name', field: 'name' },
                { name: 'Street', field: 'street' },
                { name: 'Postcode', field: 'postcode' },
                { name: 'City', field: 'city' },
                { name: 'Country', field: 'country'}
            ],
            data: [{ city: "Warsaw", country: "Poland", name: "Company 1", postcode: "00-122", street: "Waszyngtona" },
                { city: "London", country: "UK", name: "Company 2", street: "Downtown" }]
        };

        this.resultGrid.multiSelect = false;
        this.resultGrid.modifierKeysToMultiSelect = false;
        this.resultGrid.noUnselect = true;


        this.resultGrid.onRegisterApi = this.registerApi;
    }

    registerApi = (gridApi: uiGrid.IGridApi) => {
        this.gridApi = gridApi;
        this.gridApi.selection.on.rowSelectionChanged(null, this.onRowSelection);
        this.gridApi.core.handleWindowResize();
    }

0 个答案:

没有答案