Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Bootstrap + Scroller issues #189

Closed
DunkiesTier opened this issue Jan 19, 2015 · 0 comments
Closed

Bootstrap + Scroller issues #189

DunkiesTier opened this issue Jan 19, 2015 · 0 comments
Labels

Comments

@DunkiesTier
Copy link

It appears when you are using both .withBootstrap() and .withScroller(), the scroller-type pagination does not work properly. Instead of loading the data is you scroll, the dataTable instead only shows the number of records you've selected in "Show x Entries".

html:

<div class="container">
    <div data-ng-controller="DataTableAjax as table">
        <table data-datatable="" data-dt-options="table.dtOptions" data-dt-columns="table.dtColumns" class="row-border table-striped hover"></table>
    </div>
</div>

javascript:

            var app = angular.module("test", ['datatables', 'ui.bootstrap']).controller('DataTableAjax', DataTableAjax).controller("PositionControl", PositionControl);

            function DataTableAjax(DTOptionsBuilder, DTColumnBuilder) {
                var vm = this;
                vm.dtOptions = DTOptionsBuilder
                        .fromSource('test.json')
                        .withScroller()
                        .withOption('deferRender', true)
                        .withOption('scrollY', 600)
                        .withOption('responsive', true)
                        .withBootstrap()
                        ;
                console.log(vm.dtOptions);

                vm.dtColumns = [
                    DTColumnBuilder.newColumn('id').withTitle('ID'),
                    DTColumnBuilder.newColumn('firstName').withTitle('First name'),
                    DTColumnBuilder.newColumn('lastName').withTitle('Last name')
                ];
            }
@l-lin l-lin added the bug label Jan 19, 2015
l-lin added a commit that referenced this issue Jan 23, 2015
@l-lin l-lin closed this as completed Jan 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants