Skip to content

Commit

Permalink
Merge branch 'loading-state'
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed May 15, 2018
2 parents f7fda80 + c4bdcf6 commit d7595e8
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 187 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,23 @@ Show line number for each row
</vue-good-table>
```

##### mode `String`
Set mode=`remote` to allow sorting/filtering etc to be powered by server side instead of client side. Setting mode to remote, expects the following workflow:

* pagination, sort, filter, search will emit [Table Events](#table-events) (loading div appears)
* setup handlers for each event
* in the handler call backend endpoints with the table params
* update rows object with the returned response ( the loading div will disappear once you update the rows object)

```html
<vue-good-table
:columns="columns"
:rows="rows"
mode="remote">
</vue-good-table>
```


#### Sort Options
---
Set of options related to table sorting
Expand Down
2 changes: 1 addition & 1 deletion dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@on-column-filter="onColumnFilter"
:columns="columns"
:rows="rows"
mode="remotee"
mode="remote"
:pagination-options="{ enabled: true, perPage: 3}"
:search-options="{
enabled: false,
Expand Down
2 changes: 1 addition & 1 deletion dev/grouped-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@on-row-mouseenter="onMouseover"
@on-row-mouseleave="onMouseover"
:search-options="{
enabled: true,
enabled: false,
}"
:group-options="{
enabled: true,
Expand Down
Loading

0 comments on commit d7595e8

Please sign in to comment.