Bootstrap CSS-striped, not working with a knockout if attached

Let's say I have the following table that works with bootstrap css and knockout:

<table  style="cursor:pointer;" class="table table-striped table-bordered table-hover table-condensed">
   <tbody data-bind="foreach: items">
         <tr>
            <td data-bind="text: name"></td>
         </tr>
         <tr data-bind="if: somecondition">
             <td>test</td>
         </tr>
   </tbody>

</table>

Now, if I set "somecondition"to return "true", I see that there is a zebra stripe in the result table. All perfectly. But if I change the condition to false, it is obvious that the line disappears from the screen, but I do not see any color of alternating lines. Does anyone know why and how I can show the color of alternating lines?

+4
source share
2 answers

tbody , .

-1

Source: https://habr.com/ru/post/1544195/


All Articles