Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mapAdditionalProps(props: ControlProps) {
if (!isEmpty(props.schema)) {
// TODO
const defaultStep = isNumberControl(this.uischema, this.schema) ? 0.1 : 1;
this.min = props.schema.minimum;
this.max = props.schema.maximum;
this.step = props.schema.multipleOf || defaultStep;
// this doesn't seem to work reliably; an entered value will be formatted
// the 1st time when blurring out, but it doesn't work the 2nd time
// although the internal state seems correct
this.locale = getLocale(this.ngRedux.getState());
const pipe = new L10nDecimalPipe(this.localeService);
this.localeService.setDefaultLocale(this.locale);
if (this.locale) {
this.displayValue = pipe.transform(props.data, this.locale);
} else {
this.displayValue = props.data;
}
}
}
}