1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-18 08:29:50 +01:00

wip continue

This commit is contained in:
koalyptus 2019-01-22 22:23:00 +11:00
commit ecfa6c64ad
6 changed files with 72 additions and 85 deletions

View file

@ -173,10 +173,10 @@ export const FEATURES = {
name: 'popupFilter',
property: 'popupFilters'
},
rowsCounter: {
class: RowsCounter,
name: 'rowsCounter'
},
// rowsCounter: {
// class: RowsCounter,
// name: 'rowsCounter'
// },
statusBar: {
class: StatusBar,
name: 'statusBar'

View file

@ -1,11 +1,11 @@
import {TfBase} from './tfBase';
import {Register} from './register';
const NOT_IMPLEMENTED = 'Not implemented.';
/**
* Base class defining the interface of a TableFilter feature
*/
export class Feature extends TfBase {
export class Feature extends Register {
/**
* Creates an instance of Feature
* @param {Object} tf TableFilter instance

View file

@ -24,6 +24,7 @@ import {
CELL_TAG, AUTO_FILTER_DELAY, NUMBER, DATE, FORMATTED_NUMBER,
FEATURES
} from './const';
import { RowsCounter } from './modules/rowsCounter';
let doc = root.document;
@ -919,7 +920,7 @@ export class TableFilter {
* @private
*/
this.Mod = {};
this._mod_ = [];
this._mod_ = {};
/**
* Extensions registry
@ -1036,7 +1037,7 @@ export class TableFilter {
}
this.initFeatures([
rowsCounter,
// rowsCounter,
statusBar,
clearButton,
alternateRows,

View file

@ -1,21 +0,0 @@
import {defaultsStr} from './settings';
import {toCamelCase} from './string';
export class TfBase {
constructor(tf, cls = {}) {
/**
* TableFilter instance
* @type {TableFilter}
*/
this.tf = tf;
/**
* Feature name, retrieved from alternate class name if found or from
* camelised class name
* @type {String}
*/
this.feature = defaultsStr(cls.altName, toCamelCase(cls.name));
this.tf._mod_.push(this.feature);
}
}