mirror of
https://github.com/koalyptus/TableFilter.git
synced 2026-03-18 08:29:50 +01:00
wip continue
This commit is contained in:
parent
37f6db7025
commit
ecfa6c64ad
6 changed files with 72 additions and 85 deletions
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue