mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 00:09:13 +01:00
Et2Number: Special handling for width to override its min-width & max-width
This commit is contained in:
parent
41c2fa92e6
commit
da7eb6c47a
@ -60,8 +60,8 @@ export class Et2Number extends Et2Textbox
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-control-input {
|
.form-control-input {
|
||||||
min-width: 4em;
|
min-width: var(--width, 4em);
|
||||||
max-width: 7em;
|
max-width: var(--width, 7em);
|
||||||
}
|
}
|
||||||
|
|
||||||
.input__control {
|
.input__control {
|
||||||
@ -192,6 +192,11 @@ export class Et2Number extends Et2Textbox
|
|||||||
{
|
{
|
||||||
attrs.validator = attrs.precision === 0 ? '/^-?[0-9]*$/' : '/^-?[0-9]*[,.]?[0-9]*$/';
|
attrs.validator = attrs.precision === 0 ? '/^-?[0-9]*$/' : '/^-?[0-9]*[,.]?[0-9]*$/';
|
||||||
}
|
}
|
||||||
|
if(typeof attrs.width != "undefined")
|
||||||
|
{
|
||||||
|
this.style.setProperty("--width", attrs.width);
|
||||||
|
delete attrs.width;
|
||||||
|
}
|
||||||
super.transformAttributes(attrs);
|
super.transformAttributes(attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user