From 77274f1340c62505b065165799f0bb53d0568360 Mon Sep 17 00:00:00 2001 From: Ivan Date: Fri, 18 Oct 2024 00:46:07 +0200 Subject: [PATCH 1/2] fix: Value not propagated --- components/lib/inputmask/InputMask.js | 1 + 1 file changed, 1 insertion(+) 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} From 47e32cd8b9503c8da4834bdd5991c786add1fec7 Mon Sep 17 00:00:00 2001 From: Ivan Date: Fri, 18 Oct 2024 00:46:53 +0200 Subject: [PATCH 2/2] fix: Handle p-filled when value and disabled change --- components/lib/inputtext/InputText.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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 })),