ngx-easy-table
Version:
Angular easy table
53 lines • 3.51 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { Component, EventEmitter, Input, Output } from '@angular/core';
var HeaderComponent = /** @class */ (function () {
function HeaderComponent() {
this.update = new EventEmitter();
}
/**
* @param {?} key
* @return {?}
*/
HeaderComponent.prototype.unifyKey = /**
* @param {?} key
* @return {?}
*/
function (key) {
return key.replace('.', '_');
};
/**
* @param {?} input
* @return {?}
*/
HeaderComponent.prototype.onSearch = /**
* @param {?} input
* @return {?}
*/
function (input) {
this.update.emit([
{ value: input.value, key: this.column.key },
]);
};
HeaderComponent.decorators = [
{ type: Component, args: [{
selector: 'table-header',
template: "<label for=\"search_{{ unifyKey(column.key) }}\">\n <input type=\"text\"\n id=\"search_{{ unifyKey(column.key) }}\"\n aria-label=\"Search\"\n placeholder=\"{{ column.placeholder ? column.placeholder : column.title }}\"\n class=\"ngx-table__header-search\"\n #input\n (input)=\"onSearch(input)\"\n >\n</label>\n"
}] }
];
HeaderComponent.propDecorators = {
column: [{ type: Input }],
update: [{ type: Output }]
};
return HeaderComponent;
}());
export { HeaderComponent };
if (false) {
/** @type {?} */
HeaderComponent.prototype.column;
/** @type {?} */
HeaderComponent.prototype.update;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVhZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1lYXN5LXRhYmxlLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudHMvaGVhZGVyL2hlYWRlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHdkU7SUFBQTtRQU9x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