shlomiassaf / ngrid

A angular grid for the enterprise
https://shlomiassaf.github.io/ngrid
MIT License
241 stars 40 forks source link

Allow positioning the paginator in the "outer top" section above the grid #264

Open jcachat opened 1 year ago

jcachat commented 1 year ago

I would like to be able to position the paginator above the grid. Preferably inside the "outer top" section.

The reason for this is that our UI design calls for filters and action buttons in the top-left with the paginator (on the same row) to the right. Then the grid positioned below.

I had expected to be able to do this by adding the paginator like this:

<pbl-ngrid [dataSource]="ds" [columns]="columns" usePagination>
    <div *pblNgridOuterSection="'top'" style="display:flex">
        <div style="flex-grow:1">
            filter and action buttons go here
        </div>
        <pbl-ngrid-paginator *pblNgridPaginatorRef="let grid" [grid]="grid" [paginator]="grid.ds.paginator"></pbl-ngrid-paginator>
    </div>
</pbl-ngrid>

But doing that still results in it being added to the projected content below the grid.