Vue Attract: Sort/filterable table based on Vue
Initial commit implementing sortable and filterable tables for attract using Vue.
This commit is contained in:
@@ -42,7 +42,15 @@ var UnitOfWorkTracker = {
|
||||
methods: {
|
||||
unitOfWork(promise) {
|
||||
this.unitOfWorkBegin();
|
||||
return promise.always(this.unitOfWorkDone);
|
||||
if (promise.always) {
|
||||
// jQuery Promise
|
||||
return promise.always(this.unitOfWorkDone);
|
||||
}
|
||||
if (promise.finally) {
|
||||
// Native js Promise
|
||||
return promise.finally(this.unitOfWorkDone);
|
||||
}
|
||||
throw Error('Unsupported promise type');
|
||||
},
|
||||
unitOfWorkBegin() {
|
||||
this.unitOfWorkCounter++;
|
||||
@@ -56,4 +64,4 @@ var UnitOfWorkTracker = {
|
||||
}
|
||||
}
|
||||
|
||||
export { UnitOfWorkTracker }
|
||||
export { UnitOfWorkTracker }
|
||||
|
Reference in New Issue
Block a user