简体   繁体   English

无法根据下拉列表或输入字段显示表中的行数

[英]Not able to display number of rows in a table based on drop down or input field

I have a table with 'n' number of rows and by default i have set to display 10 rows in each page as the table is a paginated column. 我有一个行数为'n'的表,默认情况下,由于该表是一个分页的列,所以我设置为在每个页面中显示10行。

I am now trying to include a text box where user can enter number of rows that has to displayed in each page as below: 我现在尝试包括一个文本框,用户可以在其中输入必须在每个页面中显示的行数,如下所示:

<input type="number" min="1" max="100" ng-model="rowsperpage"/>

I have defined in my controller 我已经在控制器中定义了

$scope.rowsperpage = 10;

This is basically a smart table, trying to figure this out from past 3 hours and thought getting some help from you folks out there. 这基本上是一个智能表,试图从过去3个小时中找出来,并认为可以从那里得到一些帮助。

Please point me if am doing in wrong way, am pretty new to angular world. 如果我做错了方向,请指出我,这对有角度的世界来说是很新的。

Bind your property to st-items-by-page in st-pagination : st-pagination中将您的媒体资源按页面绑定到st-items

<table st-table="rowCollection">
    ...
    <tfoot>
        <tr>
            <td>
                <div st-pagination="" st-items-by-page="rowsperpage"></div>
            </td>
        </tr>
    </tfoot>
</table>

for more info check: http://lorenzofox3.github.io/smart-table-website/ 有关更多信息,请检查: http : //lorenzofox3.github.io/smart-table-website/

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

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