ratiw / vuetable-2

data table simplify! -- datatable component for Vue 2.x. See documentation at
https://vuetable.com
MIT License
2.16k stars 399 forks source link

Pagination rendering "No relevant data" #644

Open bcotteret opened 4 years ago

bcotteret commented 4 years ago

Hi I can't get pagination displayed Here is my component :

          <vuetable ref="vuetable"
             :api-url="apiUrl"
             :httpOptions="requestOptions()"             
             :fields="columns"
             :css="css.table"
             :render-icon='renderBootstrapIcon'
             data-path="issues"
             pagination-component="vuetable-pagination"
             pagination-path="pagination"
            @vuetable:cell-clicked="onCellClicked">
          </vuetable>
          <div class="vuetable-pagination mt-2 p-3 card no-body">
            <vuetable-pagination-info ref="paginationInfo"    
            ></vuetable-pagination-info>
             <vuetable-pagination ref="pagination"                
                :css="css.pagination"                
                @vuetable-pagination:change-page="onChangePage"
              ></vuetable-pagination>

And here is the JSON API response:

{
    "total": 1,
    "issues": [
        {
            "id": 1,
            "title": "vfdvfdvfdbvfdbdfbfdb",
            "rubric": "RECLAMATION",
            "subrubric": "",
            "company": "SFRF",
            "organization": "ST3",
            "category": "PF",
            "description": "sddsbsbdsbvrgregrgrergrsdbdsb",
            "status": "CREATED",
            "created_at": "2019-10-17T01:06:52.981+02:00",
            "priority": "high",
            "ack_at": null,
            "due_at": null
        }
    ],
    "pagination": {
        "total": 1,
        "per_page": 1,
        "current_page": 1,
        "last_page": 1,
        "prev_page_url": "http://localhost:3000/v2/issues?page=&q=",
        "next_page_url": "http://localhost:3000/v2/issues?page=&q=",
        "last_page_url": "http://localhost:3000/v2/issues?page=1&q=",
        "from": 1,
        "to": 1
    }
} 

What I am be missing ? Note: I closed the issue there https://github.com/ratiw/vuetable-2-tutorial/issues/117

jackbit commented 4 years ago

what is solution?