@furo/ui5
Version:
SAP UI5 Web Components data bindings for furo-web
36 lines (32 loc) • 876 B
JavaScript
import { Env } from '@furo/framework/src/furo.js';
import { CellInt32 } from './cell-int32.js';
/**
* `cell-furo-integerproperty`
* The cell-furo-integerproperty component displays a FieldNode of type `furo.Integerproperty` in read only mode.
*
* Every cell-xxx component should implement the following API:
* - function: bindData(fieldNode){...}
*
* @summary cell display renderer for `furo.Integerproperty`
* @element cell-furo-integerproperty
*
*/
export class CellFuroIntegerproperty extends CellInt32 {
/**
*
* @private
*/
_formatCell() {
const displayValue = new Intl.NumberFormat(Env.locale, {}).format(
this._field.data
);
if (displayValue !== 'NaN') {
this._displayValue = displayValue;
this.requestUpdate();
}
}
}
window.customElements.define(
'cell-furo-integerproperty',
CellFuroIntegerproperty
);