Refactor #5176 - invalid property added

This commit is contained in:
tugcekucukoglu 2024-01-30 14:27:56 +03:00
parent b42c9eb7ee
commit a9a254915c
54 changed files with 198 additions and 12 deletions

View file

@ -7,7 +7,11 @@ export default {
extends: BaseComponent,
props: {
modelValue: null,
autoResize: Boolean
autoResize: Boolean,
invalid: {
type: Boolean,
default: false
}
},
style: TextareaStyle,
provide() {

View file

@ -97,6 +97,11 @@ export interface TextareaProps extends TextareaHTMLAttributes {
* @defaultValue false
*/
autoResize?: boolean | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @defaultValue false
*/
invalid?: boolean | undefined;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {TextareaPassThroughOptions}

View file

@ -18,7 +18,8 @@ const classes = {
'p-inputtextarea p-inputtext p-component',
{
'p-filled': instance.filled,
'p-inputtextarea-resizable ': props.autoResize
'p-inputtextarea-resizable ': props.autoResize,
'p-invalid': props.invalid
}
]
};