Skip to content

Commit

Permalink
Fixed #5908 - InputMask: v4 no classes are passed to target inpud com…
Browse files Browse the repository at this point in the history
…ponent
  • Loading branch information
tugcekucukoglu committed Jun 26, 2024
1 parent 3e2c905 commit 4ae2e25
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/primevue/src/inputmask/BaseInputMask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default {
type: String,
default: '_'
},
class: {
type: [String, Object],
default: null
},
mask: {
type: String,
default: null
Expand Down
4 changes: 4 additions & 0 deletions packages/primevue/src/inputmask/InputMask.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export interface InputMaskProps {
* Mask pattern.
*/
mask?: string | undefined;
/**
* Style class of the input field.
*/
class?: string | object | undefined;
/**
* Placeholder text for the input.
*/
Expand Down
5 changes: 4 additions & 1 deletion packages/primevue/src/inputmask/InputMask.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<InputText
:value="modelValue"
:class="cx('root')"
:class="inputClass"
:readonly="readonly"
:disabled="disabled"
:invalid="invalid"
Expand Down Expand Up @@ -517,6 +517,9 @@ export default {
filled() {
return this.modelValue != null && this.modelValue.toString().length > 0;
},
inputClass() {
return [this.cx('root'), this.class];
},
ptmParams() {
return {
context: {
Expand Down

0 comments on commit 4ae2e25

Please sign in to comment.