简体   繁体   English

uigrid角度滚动问题

[英]uigrid angular scrolling issue

strange thing happening here. 这里发生了奇怪的事情。 I'm using a uigrid (not my first) and it's only displaying data on half it's 'canvas'. 我使用的是uigrid(不是我的第一个),它只在“画布”的一半上显示数据。

Display 显示

When I scroll, it keeps the blank part of the grid and scrolls the data side. 当我滚动时,它将保留网格的空白部分并在数据侧滚动。

Html: HTML:

            <div class="col-md-12" ng-controller="ctrl.Import">
<h4>Please drop a file into the 'Files' tab, then use the 'Data' tab to validate and upload.</h4>
<uib-tabset>
    <uib-tab heading="Files">
        ...select files here
    </uib-tab>
    <uib-tab heading="Data">
        <div class="tab-content">
            <h4 class="page-header mt0">Import file</h4>
            <div ui-grid="gridData"
                 ui-grid-resize-columns
                 ui-grid-selection>
            </div>
        </div>

Script: 脚本:

    $scope.gridData = {
        enableRowSelection: true,
        enableRowHeaderSelection: true,
        enableSorting: true,
        enableColumnMenus: false,
        multiSelect: false,
        modifierKeysToMultiSelect: false,
//      enableColumnResizing: true,
        noUnselect: true
    };

Thanks for your help! 谢谢你的帮助!

We had similar problem and workaround is to calculate and define grid height based on the number of items being rendered inside the grid. 我们有类似的问题,解决方法是根据网格内渲染的项目数来计算和定义网格高度。

or add the below style="{height:auto}" 或添加以下样式=“ {height:auto}”

<div ui-grid="gridData"
     ui-grid-resize-columns
     ui-grid-selection
     style="{height:auto}">
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM