1

I am trying to make variable number of table in a page with knockOut. Everything works fine but footable is not working. When I create one single table with knockOut, footable works fine. Here is my code for variable number of table with knockOut

<div data-bind="foreach: { data: TablesData, afterRender: function(){}}">
<table data-bind="attr: { id: 'table'+t_id }" class="footable table">

    <thead>
        <th>Date</th>
        <th>Total Inspected</th>
        <th>QTY Certified</th>
        <th>Total Defects</th>
        <th data-hide="phone">Other Defects</th>
        <th data-hide="phone,tablet">Rework Count</th>
        <th data-hide="phone,tablet">Comment</th>
    </thead>

    <tbody data-bind="foreach: { data: t_bodyData, afterRender: function(){}} ">
        <tr>
            <td data-bind="text: date"></td>
            <td data-bind="text: inspected"></td>
            <td data-bind="text: certified"></td>
            <td data-bind="text: rejected"></td>
            <td data-bind="text: other"></td>
            <td data-bind="text: rework"></td>
            <td data-bind="text: comment"></td>

        </tr>
    </tbody>
</table>

Could you please tell me how can I make it working with footable?

4

1 回答 1

0

这是我使用 Knockout.js 和 Footable 做的两个 plunk。

这是一个简单的设置列表。(键和值) http://plnkr.co/edit/VVsAiSNTvcnuCazQeuK2

这个有一个任务列表,每个任务都可以有一个任务列表。有一个问题,我正在尝试追踪 Footable 如何重绘。当嵌套表上发生重绘时,行会消失。 http://plnkr.co/edit/bXINbDBIMb0LbLitHGbl

于 2013-12-31T18:37:54.970 回答