diff --git a/components/lib/inputmask/InputMask.js b/components/lib/inputmask/InputMask.js index 505bda234b..8d030abd39 100644 --- a/components/lib/inputmask/InputMask.js +++ b/components/lib/inputmask/InputMask.js @@ -635,6 +635,7 @@ export const InputMask = React.memo( name={props.name} style={props.style} className={className} + value={props.value} {...otherProps} placeholder={props.placeholder} size={props.size} diff --git a/components/lib/inputtext/InputText.js b/components/lib/inputtext/InputText.js index 712455e737..c0e80eeb99 100644 --- a/components/lib/inputtext/InputText.js +++ b/components/lib/inputtext/InputText.js @@ -70,6 +70,14 @@ export const InputText = React.memo( const isFilled = React.useMemo(() => ObjectUtils.isNotEmpty(props.value) || ObjectUtils.isNotEmpty(props.defaultValue), [props.value, props.defaultValue]); const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip); + React.useEffect(() => { + if (isFilled) { + DomHandler.addClass(elementRef.current, 'p-filled'); + } else { + DomHandler.removeClass(elementRef.current, 'p-filled'); + } + }, [props.disabled, isFilled]); + const rootProps = mergeProps( { className: classNames(props.className, cx('root', { context, isFilled })),