forward min, max and step attribute to input node

This commit is contained in:
ralf 2022-03-06 20:44:20 +02:00
parent 4f93ceb16e
commit f76ee3c920

View File

@ -35,6 +35,25 @@ export class Et2Number extends Et2Textbox
}
}
/** @param {import('@lion/core').PropertyValues } changedProperties */
updated(changedProperties)
{
super.updated(changedProperties);
if (changedProperties.has('min'))
{
this._inputNode.min = this.min;
}
if (changedProperties.has('max'))
{
this._inputNode.max = this.max;
}
if (changedProperties.has('step'))
{
this._inputNode.step = this.step;
}
}
transformAttributes(attrs)
{
if (attrs.precision === 0 && typeof attrs.step === 'undefined')