Fixed #5908 - InputMask: v4 no classes are passed to target inpud component

pull/5969/head
tugcekucukoglu 2024-06-26 14:49:14 +03:00
parent 3e2c905bed
commit 4ae2e25f0c
3 changed files with 12 additions and 1 deletions

View File

@ -11,6 +11,10 @@ export default {
type: String, type: String,
default: '_' default: '_'
}, },
class: {
type: [String, Object],
default: null
},
mask: { mask: {
type: String, type: String,
default: null default: null

View File

@ -111,6 +111,10 @@ export interface InputMaskProps {
* Mask pattern. * Mask pattern.
*/ */
mask?: string | undefined; mask?: string | undefined;
/**
* Style class of the input field.
*/
class?: string | object | undefined;
/** /**
* Placeholder text for the input. * Placeholder text for the input.
*/ */

View File

@ -1,7 +1,7 @@
<template> <template>
<InputText <InputText
:value="modelValue" :value="modelValue"
:class="cx('root')" :class="inputClass"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:invalid="invalid" :invalid="invalid"
@ -517,6 +517,9 @@ export default {
filled() { filled() {
return this.modelValue != null && this.modelValue.toString().length > 0; return this.modelValue != null && this.modelValue.toString().length > 0;
}, },
inputClass() {
return [this.cx('root'), this.class];
},
ptmParams() { ptmParams() {
return { return {
context: { context: {