@ovh-ux/ng-ovh-checkbox-table

2.1.1 • Public • Published

ng-ovh-checkbox-table

Multi checkbox management for table

npm version Downloads Dependencies Dev Dependencies

Install

$ yarn add @ovh-ux/ng-ovh-checkbox-table

Usage

import angular from 'angular';
import ngOvhCheckboxTable from '@ovh-ux/ng-ovh-checkbox-table';

angular.module('myApp', [ngOvhCheckboxTable]);
<table class="table table-pretty table-hover table-striped">
    <thead>
        <tr>
            <th class="text-center" style="width: 35px;">
                <input
                    type="checkbox"
                    data-ovh-checkbox-table
                    data-ovh-checkbox-table-ids-all="table.myAllIds_canBeFiltered"
                    data-ovh-checkbox-table-ids-page="table.myIdsOnCurrentPage"
                    data-ovh-checkbox-table-ids-selected="table.myIdsSelectedByCheckbox"
                    data-ovh-checkbox-table-id="id">
            </th>
            <th>name</th>
        </tr>
    </thead>
    <tbody data-ng-hide="table.myAllIds_CAN_NOT_BE_Filtered">
        <tr data-ng-repeat="myData in table.myIdsOnCurrentPage">
            <td>
                <input
                    type="checkbox"
                    data-ng-model="table.myIdsSelectedByCheckbox[myData.id]"
                    name="{{::'prefix_' + myData.id}}"
                    id="{{::'prefix_' + myData.id}}">
            </td>
            <td data-title="name" class="word-break">
                <label
                    for="{{::'prefix_' + myData.id}}"
                    data-ng-bind="::myData.name">
                </label>
            </td>
        </tr>
    </tbody>
</table>

Test

$ yarn test

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS

/@ovh-ux/ng-ovh-checkbox-table/

    Package Sidebar

    Install

    npm i @ovh-ux/ng-ovh-checkbox-table

    Weekly Downloads

    11

    Version

    2.1.1

    License

    BSD-3-Clause

    Unpacked Size

    639 kB

    Total Files

    14

    Last publish

    Collaborators

    • jisay
    • blary_jp
    • antleblanc
    • cbourgois
    • ovh-ux-cds
    • lizardk
    • ovh
    • marie-j