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

Removed element IDs from PopupFilter and CheckList

This commit is contained in:
Max Guglielmi 2016-11-10 15:44:38 +11:00
commit a50e0fa4bc
11 changed files with 30 additions and 24095 deletions

View file

@ -13,8 +13,6 @@ import {CHECKLIST, NONE} from '../const';
const SORT_ERROR = 'Filter options for column {0} cannot be sorted in ' +
'{1} manner.';
const CONTAINER_ID_TPL = '{prefix}{colIndex}_{id}';
/**
* Checklist filter UI component
*/
@ -157,7 +155,7 @@ export class CheckList extends Feature {
tf.externalFltTgtIds[colIndex] : null;
let divCont = createElm('div',
['id', tf.buildId(CONTAINER_ID_TPL, {colIndex, prefix: this.prfx})],
['id', `${this.prfx}${colIndex}_${tf.id}`],
['ct', colIndex], ['filled', '0']);
divCont.className = this.containerCssClass;

View file

@ -4,8 +4,6 @@ import {createElm, removeElm} from '../dom';
import {addEvt, cancelEvt, stopEvt, targetEvt} from '../event';
import {INPUT, NONE} from '../const';
const CONTAINER_ID_TPL = '{prefix}{id}_{colIndex}';
/**
* Pop-up filter component
* @export
@ -235,13 +233,11 @@ export class PopupFilter extends Feature {
*/
build(colIndex, div) {
let tf = this.tf;
let contId = tf.buildId(
CONTAINER_ID_TPL,
{colIndex, prefix: this.prfxDiv}
);
let contId = `${this.prfxDiv}${tf.id}_${colIndex}`;
let popUpDiv = div || createElm('div', ['id', contId]);
popUpDiv.className = this.containerCssClass;
tf.externalFltTgtIds.push(popUpDiv.id);
let header = tf.getHeaderElement(colIndex);
header.insertBefore(popUpDiv, header.firstChild);
addEvt(popUpDiv, 'click', (evt) => stopEvt(evt));