Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Commit

Permalink
Merge pull request #65 from RichardBradley/allow_disable_sort
Browse files Browse the repository at this point in the history
Add Field.sortable property for ng-admin/#372
  • Loading branch information
fzaninotto committed May 25, 2016
2 parents 86ef140 + 52d1aa2 commit 96de955
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/Field/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Field {
this._validation = { required: false, minlength : 0, maxlength : 99999 };
this._defaultValue = null;
this._editable = true;
this._sortable = true;
this._detailLinkRoute = 'edit';
this._pinned = false;
this._flattenable = true;
Expand Down Expand Up @@ -193,6 +194,12 @@ class Field {
return this;
}

sortable(sortable) {
if (!arguments.length) return this._sortable;
this._sortable = sortable;
return this;
}

detailLinkRoute(route) {
if (!arguments.length) return this._detailLinkRoute;
this._detailLinkRoute = route;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "admin-config",
"version": "0.11.0",
"version": "0.11.1",
"private": false,
"repository": {
"type": "git",
Expand Down

0 comments on commit 96de955

Please sign in to comment.