Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
set step(v) {
this._step = coerceNumberProperty(v, this._step);
if (this._step % 1 !== 0) {
this._roundLabelTo = /** @type {?} */ ((this._step.toString().split('.').pop())).length;
}
// Since this could modify the label, we need to notify the change detection.
this._changeDetectorRef.markForCheck();
}
/**
transform(
// tslint:disable-next-line:no-any
input: any,
factor: number = KILO_MULTIPLIER,
inputUnit: DtUnit = DtUnit.BITS,
): DtFormattedValue | string {
if (isEmpty(input)) {
return NO_DATA;
}
if (input instanceof DtFormattedValue) {
return formatBits(input, { factor, inputUnit });
}
if (isNumber(input)) {
return formatBits(coerceNumberProperty(input), { factor, inputUnit });
}
return NO_DATA;
}
}
function coerceInsertionIndex(value: any): number | 'start' | 'end' | undefined {
if (value === '') {
return undefined;
}
if (value === 'start' || value === 'end' || value === undefined) {
return value;
}
return coerceNumberProperty(value);
}
this._pageSizeOptions = (value || []).map(p => coerceNumberProperty(p));
this._updateDisplayedPageSizeOptions();
set minSelections(minSelections) {
this._minSelections = coerceNumberProperty(minSelections);
}
set fixedTopGap(value) { this._fixedTopGap = coerceNumberProperty(value); }
private _fixedTopGap = 0;
function (page) {
if (page === 1 || (page >= 1 && page <= this.maxPage)) {
this._page = coerceNumberProperty(Math.floor(page));
this._handleOnChange();
return true;
}
return false;
};
/**
set rowspan(value: number) { this._rowspan = Math.round(coerceNumberProperty(value)); }
set colspan(value: number) { this._colspan = Math.round(coerceNumberProperty(value)); }
public set size(v: number | string) {
this.setStyle('flex-basis', `${coerceNumberProperty(v)}px`);
}