Skip to content
This repository was archived by the owner on Apr 1, 2022. It is now read-only.

add ability to change the sort column #122

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/en/details/props-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ These are the properties of `columns[i]`:
| field | Field name of the row | String | - | - | N |
| explain | Explanation of the field (tooltip) | String | - | - | N |
| sortable | Is sortable | Boolean | true / false | false | N |
| sortField | Field to use for sorting if different than field. | String | - | - | N |
| visible | Is visible | Boolean / String (if the type is String, the visibility is not allowed to toggle) | true / false / 'true' / 'false' | true | N |
| fixed | Is fixed | Boolean / String | true / false / 'left' / 'right' | - | N |
| group | Group name | String | - | - | N |
Expand Down
1 change: 1 addition & 0 deletions examples/dist/client.914ee790.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion examples/dist/client.e34add27.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

<script src="//unpkg.com/jquery@2.1.4/dist/jquery.min.js"></script>
<script src="//unpkg.com/bootstrap@3.3.5/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="client.e34add27.js"></script></body>
<script type="text/javascript" src="client.914ee790.js"></script></body>
</html>
4 changes: 2 additions & 2 deletions src/Table/TableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<i v-if="col.explain" class="fa fa-info-circle" style="cursor: help" :title="col.explain"></i>
<head-sort v-if="col.sortable" :field="col.field" :query="query" />
<head-sort v-if="col.sortable" :field="col.sortField || col.field" :query="query" />
</th>
</transition-group>
</thead>
Expand All @@ -35,6 +35,6 @@ import shouldRenderSelection from '../_mixins/shouldRenderSelection'
export default {
name: 'TableHeader',
components: { HeadSort, MultiSelect },
mixins: [props, shouldRenderSelection]
mixins: [props, shouldRenderSelection],
}
</script>